is_numeric and MAC input

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • vote1040@grammarian.com

    is_numeric and MAC input

    Hi,
    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)?
    Les

    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","dbn ame", "passwd");
    mysql_select_db ("dbname");
    $query = "select agency from agency where agency_id = '$ag';";
    $result = mysql_query($qu ery) or die("Error, agency query
    failed");
    while ($row = mysql_fetch_arr ay($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/1.3.26.1a mod_fastcgi/2.4.2
    mod_throttle/3.1.2 Chili!Soft-ASP/3.6.2 FrontPage/5.0.2.2635 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

Working...