Problem I'm having is a #f1 is being passed between all of my pages, the #f1 refers to my login form eg 127.0.0.1/#f1 displays login form using div tags. Form posts to itself for validation then is redirected to 127.0.0.1/_af/act_login.php with session variables to login user using die(header(location:)); exit()
. But that URL will also have #f1 at end eg 127.0.0.1/_af/act_login.php#f1. Then when I redirect from that page back to 127.0.0.1 it carries it over again eg 127.0.0.1/#f1 bring up the login form again instead of just my home page. Not sure what I'm doing wrong? or where to look to fine answer, any help appreciated. Thank you.
Here's snippets of the code:
To bring up login form: <a href="#f1"><li>Login</li></a>
Login form:
<div id="f1">
<div id="loginForm">
<h3>Login</h3>
<form name="loginForm" action="" method="post">
<input type="hidden" name="form" value="Login" />
<div>Email:</div>
<div><input type="text" name="email" value="" /></div>
<div id="newLine"></div>
<div>Password:</div>
<div><input type="password" name="password" /></div>
<div id="newLine"></div>
<div class="submitButton"><input type="submit" value="SUBMIT" /></div>
</form>
</div> </div>
PHP once validation complete to redirect:
die(header("Location: _af/act_login.php"));
exit();
}
PHP to redirect back once log entries made and log in complete:
die(header('Location: http://127.0.0.1'));
exit();