I have a page that has this logic in it:
//We can call it access.php
if (!isset($_SESSI ON['user'])){
header("Locatio n:index.php");
exit();
}
//Here is the index.php
echo "<br>" . $_SERVER['HTTP_REFERER'];
The index.php displays this when it is called from the access.php:
Notice: Undefined index: HTTP_REFERER in /usr/local/apache2-
development/htdocs/index.php on line
How can I go to access.php and then is the user object is not set, it
forwards me to the index page and the index page now knows where it
came from so that the index page acan follow some logic and return to
the access.php page?
//We can call it access.php
if (!isset($_SESSI ON['user'])){
header("Locatio n:index.php");
exit();
}
//Here is the index.php
echo "<br>" . $_SERVER['HTTP_REFERER'];
The index.php displays this when it is called from the access.php:
Notice: Undefined index: HTTP_REFERER in /usr/local/apache2-
development/htdocs/index.php on line
How can I go to access.php and then is the user object is not set, it
forwards me to the index page and the index page now knows where it
came from so that the index page acan follow some logic and return to
the access.php page?
Comment