Tuff time to think about linking ajax and php

In the morning i got a project to check “password strength” from the user given data.. To be honest i`m not that much flexible with AJAX, infact i`ll take some old working articles and make it work for me..

But today i got a very good script thought of blogging it with all my friends who may face issues like me…

How does the script work ? Keeping in mind, the four important factors of any password I made the php backend of the this script. To get the best output (Uber Secure) your password must satisfy all these four conditions –

* String length should be minimum 8

* String should have 1 or more uppercase letter(s)

* String should have at least 1 special character

* String should have at least 1 number in it.

Now how the script ranks ? Simple, the script checks for all the above conditions and depending on the number of conditions which return true, the script determines the rank! If none of the condition is true, then the script says “Pretty Weak”.

How the AJAX part works ? Simple too! As soon as the keystroking is stopped on the keyboard, the js function (onkeyup) peforms a ajax action which calls upon the PHP with the string the user has entered. Then the PHP determines the rank and sends it back to the script using AJAX.

  1. you really saved my day… thanks mohan

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: