When you have an IF-THEN-ELSE, do you start with the “positive” portion first, and then save the “negative” for last, or visa-versa?
For example, Positive first…
if (isset($_GET['x']) && strlen($_GET['x'])==40){
// Valid Format.
$tempPassword = $_GET['x'];
}else{
// Invalid Format.
$_SESSION['resultsCode'] = 'PASSWORD_INVALID_TEMP_PASSWORD';
// Redirect to Outcome Page.
header("Location: " . BASE_URL . "members/change_password_results.php");
// End script.
exit();
}//End of CHECK FOR TEMP PASSWORD
For example, Negative first…
if (!isset($_GET['x']) && strlen($_GET['x'])!==40){
// Invalid Format.
$_SESSION['resultsCode'] = 'PASSWORD_INVALID_TEMP_PASSWORD';
// Redirect to Outcome Page.
header("Location: " . BASE_URL . "members/change_password_results.php");
// End script.
exit();
}else{
// Valid Format.
$tempPassword = $_GET['x'];
}//End of CHECK FOR TEMP PASSWORD
Debbie