PHP Foreground code Redemption get user Password function

Source: Internet
Author: User
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
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.