Hi guys,
I'm working on my register file in my membersysteem and I have a question:
I want one message to be displayed when a user don't fill in his password,
and one message when he fills in a password that's to short, so I tried the following:
if (strlen($pass) == 0 ){
$msg=$msg."NO password filled in!!<br/>";
$status= "NOTOK";
}
if (strlen($pass) < 3 ){
$msg=$msg."Your pass should be longer than 3 chars<br/>";
$status= "NOTOK";
}
if ($pass <> $pass2 ){
$msg=$msg."Passwords don't match<br/>";
$status= "NOTOK";}
But now, it displays both the warning that the password should be longer than 3 characters and the warning that the password should be filled in:
This is what is displayed:
No password filled in!!
Your pass should be longer than 3 chars
retry
How can evoid them to be displayed at the same time?
So, what I want is a message to appear when a password is not filled in
and If it's to short, also 1 message
Thank you for your help,