Hi,
I'm not able to pass session and read variables from it when I pass it to another php script. I'm calling from login.php index.php script and trying to get $AYTHENTICATED variable from session, but it always empty! I have following code:
index.php scipt:
if(!$AUTHENTICATED)
{
$page = "login";
header("Location: http://xxx/login.php);
}
else if($AUTHENTICATED){
$page = "finalpage";
header("Location: http://xxx.listaus.php?&p=" . $PAGE);
login.php script:
...
if ("password is mathing to passwd in db)
{
$PAGE = $POSTING;
$IPADDR = $REMOTE_ADDR;
$AUTHENTICATED = TRUE;
session_name($SESSION_NAME);
$new_id = md5(uniqid(rand(),1));
session_id($new_id);
session_start();
session_register("USER", "IPADDR", "AUTHENTICATED", "PAGE");
header("Location: http://xxx/index.php&p=" . $POSTING ."&". SID);
exit;
}
...
What I'm doing wrong?