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

Reply via email to