is_numeric and MAC input

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
My MAC users (2 so far, unknown OS versions) complain that my code
always fails here saying
From: les
     Subject: Bugs
     Message: Hi John, I couldn't get it to work! It didn't seem to
recognize my numbers as numbers. Is this because I am on a Mac (gasp)?

Other users do not have this problem.

Any idea why this function would fail?

First we get the data:

$doag=$_GET['DOAG']; check100($doag, "doag");

Here is the function call. It should check for a valid number, then,
if it isn't valid, find the agency the user submitted and tell them
they need to send a number.

function check100($x, $ag) {
if (!is_numeric($x)){
    mysql_connect("localhost","dbname", "passwd");
    $query = "select agency from agency where agency_id = '$ag';";
    $result = mysql_query($query) or die("Error, agency query
while ($row = mysql_fetch_array($result))
{ $ag = $row['agency']; }
$e_code[6]=$e_code[6] + 1;
print "The value in $ag is not a number, please try again.";

My server runs

Apache/1.3.37 Ben-SSL/1.57 (Unix) mod_gzip/ mod_fastcgi/2.4.2
mod_throttle/3.1.2 Chili!Soft-ASP/3.6.2 FrontPage/ mod_perl/
1.29 PHP/4.4.6

Operating System
Name: Linux
Vendor: Debian
Version: CustomLinux

PHP Version:      4.4.6

MySQL Version:     5.0.30

Re: is_numeric and MAC input

On 24 Apr 2007 13:05:37 -0700, wrote:

Quoted text here. Click to load it

Perhaps it's a problem with the form enctype setting?

Site Timeline