Beverleyh
06-16-2009, 10:52 AM
Hi,
This login form is in my website's template header file and php included so it shows on all pages of my website.
<form action="login.php" method="post" enctype="multipart/form-data">
Username: <input type="text" name="username"><br>
Password: <input type="password" name="password"><br>
Remember Me? <input type="checkbox" name="autologin"><br>
<input type="hidden" name="redirect" value="index.php">
<input type="submit" value="Login" name="login">
</form>
At the moment, a user can log in from any page but the hidden redirect always sends the user back to the index page.
I would like the form to send the user back to the page where they logged in from so its less confusing.
Is there a script that can do this or do I have to resort to putting a login form in every page and customising the redirect url?
Any advice is welcome.
Thanks
This login form is in my website's template header file and php included so it shows on all pages of my website.
<form action="login.php" method="post" enctype="multipart/form-data">
Username: <input type="text" name="username"><br>
Password: <input type="password" name="password"><br>
Remember Me? <input type="checkbox" name="autologin"><br>
<input type="hidden" name="redirect" value="index.php">
<input type="submit" value="Login" name="login">
</form>
At the moment, a user can log in from any page but the hidden redirect always sends the user back to the index page.
I would like the form to send the user back to the page where they logged in from so its less confusing.
Is there a script that can do this or do I have to resort to putting a login form in every page and customising the redirect url?
Any advice is welcome.
Thanks