tripodkid
03-18-2006, 11:49 AM
Hello,
I wrote this very simple script to test the length of passwords. However, it always redirects to the error header location even when the password is between 5 - 10 characters. When the password is not between 5 - 10 characters the script acts as it should and exits. But, when password is between 5 - 10 characters the script continues without exiting even though it redirects to the error header location.
This is driving me crazy and I know I must be missing something really dumb here!
Many thanks for your help!
Chris
//Checks that the password is between 5-10 characters
$password = ($_POST['customer_password']);
$pw_len = strlen($password);
if(($pw_len <5) || ($pw_len >10)){
header("Location:register.php?error=PWlen");
exit;
}
I wrote this very simple script to test the length of passwords. However, it always redirects to the error header location even when the password is between 5 - 10 characters. When the password is not between 5 - 10 characters the script acts as it should and exits. But, when password is between 5 - 10 characters the script continues without exiting even though it redirects to the error header location.
This is driving me crazy and I know I must be missing something really dumb here!
Many thanks for your help!
Chris
//Checks that the password is between 5-10 characters
$password = ($_POST['customer_password']);
$pw_len = strlen($password);
if(($pw_len <5) || ($pw_len >10)){
header("Location:register.php?error=PWlen");
exit;
}