horseatingweeds Posted March 2, 2008 Share Posted March 2, 2008 <?php if ($_POST['submit']) { if (preg_match("/^([A-Z '-\.]+)$/i", $_POST['name'])) { $errors = 'Please enter a valid name.'; } if (strlen($errors) < 1) { $return = true; } else { echo $errors; $return = false; } return $return; } ?> I've even tried changing return $return to return false. I don't see ehat stupid thing I'm doing wrong. Quote Link to comment Share on other sites More sharing options...
shocker-z Posted March 2, 2008 Share Posted March 2, 2008 should that not be greater than (>) 1 not less than(<)? if (strlen($errors) > 1) Regards Liam Quote Link to comment 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.