I am trying to detect if a users password is less than or equal to 5 characters then to error the user otherwise continue..

<?
$pass = $_POST[password];
if($pass <=5){
echo"Error";
}else{
echo"YAY no errors!";
}
?>

I can't get it to work can anyone point out a way to detect this xD

Any help is much appreciated!

Great :D

Thank you!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.