php - If $_POST variable is not 3 numbers long -


i person's weight, on 18 years old 100 pounds plus, want check if $_post variable weight entered 3 digits only. have form user enters weight...

if (!is_numeric($weight)) {     echo "you did not enter numeric weight.";     die; } 

using above make sure it's numeric... want verify number 3 digits.

thank you

you can do:

is_numeric($weight) && ($weight > 99) && ($weight < 1000) 

Comments

Popular posts from this blog

php - cannot display multiple markers in google maps v3 from traceroute result -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -