#******************************************************************************
#function to checking the password's pattern and its length
#******************************************************************************
function checkPasswordAndStrength($password) {
$strength = 0;
$patterns = array(
'#[a-z]#',
'#[A-Z]#',
'#[0-9]#',
);
foreach($patterns as $pattern) {
if(preg_match($pattern, $password, $matches)) {
$strength++;
}
}
if(strlen($password) >= 8) {
$strength++;
}
return $strength;
}
#************************************************************************
[Wednesday, January 02, 2008
|
0
comments
]
Popular Posts
- function to check whether the year given is a leap year or not
- Elgg : The most popular open source social networking platform
- php Questions
- errrors in php
- Php Questions
- Php Questions
- OOP in PHP5
- mysql
- Ansewer This What is the output of the following code?
- How to find out the Mysql storage engine type of a table.
0 comments
Post a Comment
Please put your comments here. your questions, your suggestions, also what went wrong with me.