As we know that we can call any function of Javascript to control's event like onblur() or onclick() etc.
but ,, i don't want to use javascript...is there another way to call php function
actually i want to check password strength whater it is weak, average or strong..using PHP.
jQuery and pwdMeter include:
<script type="text/javascript" src="jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="jquery.pwdMeter.js"></script>
jQuery to fire a call to plugin:
<script type="text/javascript">
$(document).ready(function(){
$("#password").pwdMeter();
});
</script>
This code call .pwdMeter(); function on document ready trigger.
HTML Code:
<div id="grid">
<input type="password" id="password">
<span id="pwdMeter" class="neutral"></span>
</div>
It will show textbox to enter password and when you enter something in password box it shows you strength in empty span.
<style>
.veryweak{
color:#B40404;
}
.weak{
color:#DF7401;
}
.medium{
color:#FFFF00;
}
.strong{
color:#9AFE2E;
}
.verystrong{
color:#0B610B;
}
</style>
The thing about password meters is that they need to work dynamically. The only way I can think of you using a PHP function to dynamically determine the strength for a password that is SAFE, is to send a request through an AJAX POST with SSL (HTTPS).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.