I have created a HTML form for a user to login that checks against a database of usernames and passwords to ensure authenticity.
If it's good to go, I redirect to a new page, but if it's not I am trying to display a message on my "Login" page and allow the user to re-enter a username and password. Below is what I am using...I included echo statements to me sure that I entered these. The problem lies in the "else". The 'redirect' is the name of a hidden tag on my form that I am assigning a value to if the 'else' portion is executed.
if (isset($_SESSION) && false) {
$MM_redirectLoginSuccess = $_SESSION;
}
//echo "post redirect is " .$_POST;
header("Location: " . $MM_redirectLoginSuccess );
}
else {
$_POST = 'invalid';
echo "t";
header("Location: ". $MM_redirectLoginFailed );
Then within my HTML I say this
<?php if(isset($_POST)){ echo "<h4>HELP!</h4>"; }?>
As long as I have the 'echo' statement in the else, it displays "HELP". Why does it not do this as soon as take the echo out. BOGGLED!!!
Thanks to anyone who can help me figure this out!
Tara