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
Post a Comment