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']!=){ } 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 Link to comment https://forums.phpfreaks.com/topic/146404-form-validation-number-only/#findComment-768673 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.