You are here: Re: is_numeric and MAC input « PHP Programming Language « IT news, forums, messages
Re: is_numeric and MAC input

Posted by usenet on 04/24/07 20:24

On 24 Apr 2007 13:05:37 -0700, vote1040@grammarian.com wrote:

>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","dbname", "passwd");
> mysql_select_db("dbname");
> $query = "select agency from agency where agency_id = '$ag';";
> $result = mysql_query($query) or die("Error, agency query
>failed");
>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/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

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация