Jump to content

form validation number only


calmchess

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.