Re: ereg function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Numbers are pretty easy.  You could just do:

   $age = (int)$_POST['age'];
   if($age > 9) do_something();
   else do_something_else();

Using ereg doesn't make much sense in this case.

-Rasmus

On Fri, 31 Dec 2004, Michael Lutaaya wrote:

> I want to validate someones age. How do I do this in
> the ereg function.
>
> I also have some visitors on my site who are in
> between the ages of 7-9 so don't forget to make them
> part of the ereg function.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux