How can I check a value entered in a field on my form is a number?
Here's an example:
<?php
$formvalue = "57a";
if(is_numeric($formvalue)) { echo "Is a number"; } else { echo "Not a number"; }
?>
This prints 'Not a number' in this instance.
Comment on this Question and Answer >>>
ASK A QUESTION
More forms PHP Questions
How do you email the contents of a form to someone?Hi all , I use CURL to login to webtrafficagents.com . I got the script and modified it to login to several sites , but it can't login to this one , any experts can help , a reward is granted :) what i want : I want to be able to view the source
How can I access information sent through POST on a form?
if i send values to database ,but in that table zeros is added ,how can i rectify the error
What are magic quotes?
