note 41476 deleted from function.session-start by irchtml

From: Date: Sun, 11 Apr 2004 22:37:40 +0000
Subject: note 41476 deleted from function.session-start by irchtml
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-67996@lists.php.net to get a copy of this message
Note Submitter: strozzino@email.it ---- When u make a redirection u'll lost the session id...to solve this try in this way: //session_start() session_start(); //get session_id $id = session_id(); //get session_name $name = session_name(); //merge $_SESSION['session'] = "?" . $name . "=" . $id; when u'll make a redirection like this echo "<meta http-equiv='refresh' content='$seconds;url=$url'>"; in the $url variable u have to add the session before saved in $_SESSION['session'], like this: $session = $_SESSION['session']; $url="./some_page.php" . $session; $seconds = the seconds u want echo "<meta http-equiv='refresh' content='$seconds;url=$url'>"; this will work good...but remeber to start the session also in the page of redirection.....

« previous php.notes (#67996) next »