Page is a not externally linkable
Mr_Cat - 8:22 pm on Feb 12, 2012 (gmt 0)
Right!
Job done, and what a palava.
Here's how, and if you have a sleeker method please do tell.
In verify.php on every page I have:
$document = $_SERVER['PHP_SELF'];
$host = $_SERVER['HTTP_HOST'];
$querystring = '?'.$_SERVER['QUERY_STRING'];
$fullpath = $host.$document.$querystring;
session_start();
$user_check = $_SESSION['login_user'];
$_SESSION['referer'] = $fullpath;
then obviously and simply in login.php it's:
header("location: http://".$_SESSION['referer']);
I feel very proud now so any pats on the back most welcome along with sleeker methods.
The problem was the referer was just plain empty no matter what I did. No idea why, but this works a treat.
Cheers folks