I'm rather new to PHP.. so this may be a simple question..
I have a members area..which works fine.. but after login (from any restricted page) the user is sent to the front page:
<META HTTP-EQUIV=Refresh CONTENT="2; URL=index.php">
This line is included in one of the config files.
Can I somehow sent them to the page they were accessing in first place?
Thanks in advance!
login
Moderator: General Moderators
what I do is include an "application.php" file on all of my pages I want secured.
In there I set session vars. If the loggedin session var isn't set then I send them to the login screen and pass the page they were on in the url string. Then when they log in, I point them to the page they were on.
see code ex. below:
Burr
In there I set session vars. If the loggedin session var isn't set then I send them to the login screen and pass the page they were on in the url string. Then when they log in, I point them to the page they were on.
see code ex. below:
Code: Select all
<?
error_reporting(E_ERROR);
if(!isset($_SESSIONї"loggedin"])){
$location = "http://".$_SERVERї"SERVER_NAME"].$_SERVERї"PHP_SELF"].(isset($_SERVERї'QUERY_STRING']) ? '?' . $_SERVERї'QUERY_STRING'] : '');
?>