On Thu, 20 Feb 2003, Robert E. Harvey, M.D. wrote:

>I'd like to verify input data transferred from a form and make sure it 
>is numeric data or null before my program executes.  I am using this 
>syntax, which doesn't work:
>
>for ($i=1;$i<=3;$i++)
>{
>  if (ereg('[0-9]+','$_POST["gamt_$i"]'))
> {
>   continue;
> }
>  else
>    {
>      die("Non-numeric data entered in grass entry field(s).");
>    }
>}

Try changing '$_POST["gamt_$i"]' to $_POST['gamt_$i']


-- 
Greg Donald
http://destiney.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to