I have PHP Login System with Admin Features incorporated into one of my websites and it works great.
One thing I would like to change is the page you are sent to after you login. Currently process.php is set to
/* Login successful */
if($retval){
header("Location: index.php");
How could I set this script up to refer the user back to the page that sent them to login.php to begin with?
Currently clicking on a secure page goes like this: securepage.php -> login.php -> index.php -> then click on securepage.php again.
I'd like it to go like this after clicking a secure page: securepage.php -> login.php -> refer back to securepage.php
I could always put a message on the main page saying you must login "first" but not all pages require users to be logged in. The web page is used as a shipping/receiving log and anyone can look at the log but only registered users can create or edit entries.
Could you somehow save the referring url into a variable and then tell the script to go to that url if login was successful?
Thanks for your help...
One thing I would like to change is the page you are sent to after you login. Currently process.php is set to
/* Login successful */
if($retval){
header("Location: index.php");
How could I set this script up to refer the user back to the page that sent them to login.php to begin with?
Currently clicking on a secure page goes like this: securepage.php -> login.php -> index.php -> then click on securepage.php again.
I'd like it to go like this after clicking a secure page: securepage.php -> login.php -> refer back to securepage.php
I could always put a message on the main page saying you must login "first" but not all pages require users to be logged in. The web page is used as a shipping/receiving log and anyone can look at the log but only registered users can create or edit entries.
Could you somehow save the referring url into a variable and then tell the script to go to that url if login was successful?
Thanks for your help...