changing password problem
Posted: Tue May 13, 2003 8:42 am
in my script i have the following
if (strlen($new_passwd)>16 || strlen($new_passwd)<4)
{
echo "<div class=\"log\">Passwords must be between<br />4 and 16 chars.";
}
else
{
if ($_SESSION['pass'] != $old_passwd)
echo "<div class=\"log\">Your old password is incorrect<br />please try again.</div>";
if ($new_passwd!=$new_passwd2)
echo "<div class=\"log\">The passwords do not match.<br />passwords not changed.</div>";
}
how do i create a statement that will only execute if non of the above are true, ie. form was filled in correctly?
if (strlen($new_passwd)>16 || strlen($new_passwd)<4)
{
echo "<div class=\"log\">Passwords must be between<br />4 and 16 chars.";
}
else
{
if ($_SESSION['pass'] != $old_passwd)
echo "<div class=\"log\">Your old password is incorrect<br />please try again.</div>";
if ($new_passwd!=$new_passwd2)
echo "<div class=\"log\">The passwords do not match.<br />passwords not changed.</div>";
}
how do i create a statement that will only execute if non of the above are true, ie. form was filled in correctly?