calmchess Posted February 22, 2009 Share Posted February 22, 2009 I'm useing the following if statement to validate a form.. the problem is i can't figure out how to validate that the user actually entered a number instead of alphabetic letters....will somebody plz tell me how to check for a number? if(strlen($_POST['age']) > 2 || $_POST['age'] < 18 ||$_POST['age']!=){ } Quote Link to comment https://forums.phpfreaks.com/topic/146404-form-validation-number-only/ Share on other sites More sharing options...
wildteen88 Posted February 22, 2009 Share Posted February 22, 2009 Use is_numeric Quote Link to comment https://forums.phpfreaks.com/topic/146404-form-validation-number-only/#findComment-768673 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.