Another thing that you can do is cast the variable to integer
$int = (int) $_POST['data'];
"Dominique Anokre" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Is there a way with php to force the user to put only numeric character in a
text field ?
thanks
--
PHP General Mailing List
If you wanted to force them to put in valid numeric characters, you
would have to use JavaScript (client-side). However, if you wanted to
verify the information from the server side, you could use is_numeric()
to check whether the value is a number.
http://www.php.net/is-numeric
Dominique Ano
2 matches
Mail list logo