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?"); Quote 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. } Quote Link to comment https://forums.phpfreaks.com/topic/56477-form-character-count-error/#findComment-278930 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.