monkeybidz Posted June 21, 2007 Share Posted June 21, 2007 My form currently checks for Zip Code empty field or checks that the Zip Code input matches the data base info. How would i get this form to return an error if the field text is less than 5 characters or digits? Next error message will be: $arrErrors = '3'; Current form checker is: if ($_POST['zip2']==''|| $zip2 === 'false'.$z) $arrErrors = '02'; header("Location: quote_error.php?"); Link to comment https://forums.phpfreaks.com/topic/56477-form-character-count-error/ Share on other sites More sharing options...
corbin Posted June 21, 2007 Share Posted June 21, 2007 if(strlen($_POST['zip2']) != 5) { //incorrect zip code length. } Link to comment https://forums.phpfreaks.com/topic/56477-form-character-count-error/#findComment-278930 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.