site will not redirect to previous url after login
on the "users_Login.php" page i have the following "SecurityAssist Authenticate User" settings:
<?php
if(($_SERVER["REQUEST_METHOD"] == "POST") && (isset($_SERVER["HTTP_REFERER"]) && strpos(urldecode($_SERVER["HTTP_REFERER"]), urldecode($_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"])) > 0) && isset($_POST)){
$WA_Auth_Parameter = array(
"connection" => $localhost,
"database" => $database_localhost,
"tableName" => "users",
"columns" => explode($WA_Auth_Separator,"UserEmail".$WA_Auth_Separator."UserPassword"),
"columnValues" => explode($WA_Auth_Separator,"".((isset($_POST["username"]))?$_POST["username"]:"") ."".$WA_Auth_Separator."".((isset($_POST["userpassword"]))?$_POST["userpassword"]:"") .""),
"columnTypes" => explode($WA_Auth_Separator,"text".$WA_Auth_Separator."text"),
"sessionColumns" => explode($WA_Auth_Separator,"UserID".$WA_Auth_Separator."UserEmailVerified".$WA_Auth_Separator."UserEmail".$WA_Auth_Separator."UserFirstName"),
"sessionNames" => explode($WA_Auth_Separator,"UserID".$WA_Auth_Separator."UserEmailVerified".$WA_Auth_Separator."UserEmail".$WA_Auth_Separator."UserFirstName"),
"successRedirect" => "users_Profile.php",
"failRedirect" => "users_LogIn.php?failed=1",
"gotoPreviousURL" => TRUE,
"keepQueryString" => TRUE
);
WA_AuthenticateUser($WA_Auth_Parameter);
}
?>
And the Form Tag is as follows:
<form action="<?php echo ($_SERVER["PHP_SELF"].(isset($_SERVER["QUERY_STRING"])?"?".htmlentities($_SERVER["QUERY_STRING"]):""));?>" method="post" name="WAATKLogInForm" id="WAATKLogInForm">
After clicking a "Login" link on my "Home" page (which is not a protected page) which directs clients to the "users_LogIn.php" form, and submit a validated login, I am not returned to the "Previous URL" or "Home" page as all the documentation says it should.
It then goes to the "profile" page, instead. Please tell me what settings I have incorrectly set.