PHP foreground code implementation to get the user password function
For example, user login-Enter the personal homepage
When entering the personal home page, verify that the user password is all digital or full English
Access to personal homepage tips
Pop out of the layer content:
The system detects your account password is too simple, there are serious security risks, it is recommended that you modify in time, so as not to cause the recording is mistakenly deleted and other unnecessary trouble and loss.
Two x buttons <修改> <以后再说>
User jquery or PHP can be implemented in some way?
Share to:
------Solution--------------------
With Ajax can be implemented, Document.ready can send the user into the background query, and then passed back to judge just
------Solution--------------------
Reference:
Since you verified the login that is, of course, before the validation of the user entered the password and then you take this password and you make "is too simple" rule to match if too simple to prompt.
Every time I see you, it's like stripping your clothes ...
------Solution--------------------
Want to use the regular one to match your needs ... Failed to succeed. Let's just write it apart.
$Password = "Assssssss";
$num = 0;
if (Preg_match ("/[a-z]/", $Password)) {
$num + +;
}
if (Preg_match ("/[0-9]/", $Password)) {
$num + +;
}
if (Preg_match ("/[a-z]/", $Password)) {
$num + +;
}
if (Preg_match ("/[^a-za-z0-9]/", $Password)) {
$num + +;
}
if ($num >=2 && strlen ($Password) >=6 && strlen ($Password) <=16) {
//
}else{
Hint Code
}
In addition, I look at the landlord title is required foreground code but you need to describe the login prompt so it is best to use PHP to prompt