if (empty($pass)) {
return "<br />Password field is empty";
}
if (!ctype_alnum($pass)) {
return "<br />Password has special character";
}
However, this all seems like a lot for an average user. If the user wants a weak password, let them have it. Just make sure you're doing all you can to protect them in your database.
I read that somewhere, let me see if I can find the source. Oh, and why would you not let them have special characters in their password?
Found somethingFound something sort of like what I was talking about