If you are getting a number from a user via a form you can use
javascript to verify that the user inputed a number...

search google -> validating forms  that should give you some info.

You could also verify that the data is a number by is_numeric or
is_int...

I think that when the data is POSTed that it will be a string so you can
use is_numberic to verify if it is...

http://www.php.net/manual/en/function.is-numeric.php


On Wed, 2002-12-04 at 14:01, Stephen wrote:
> I have a repeating function to add. The user enters the number of how many
> numbers they want to add, then it repeats a form field. What I want to do is
> detect to make sure that the value they enter is a number. If not, don't do
> the do while loop and if it is, then go ahead and do it. How can I do this?
> 
> Thanks,
> Stephen Craton
> http://www.melchior.us
> 
> "What is a dreamer that cannot persevere?" -- http://www.melchior.us
> 
> 
> ______________________________________________________________________
> 
> -- 
> 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