note 51813 added to function.session-start

From: Date: Mon, 11 Apr 2005 23:58:33 +0000
Subject: note 51813 added to function.session-start
Groups: php.notes 
Request: Send a blank email to php-notes+get-87867@lists.php.net to get a copy of this message
One more note related to loosing sessions after header() redirects: I had problem with script, that after writing data to database redirected the user to a different page. I was loosing sessions after every redirect, and only solution I found was to pass session info in header URL itself: <? header("Location: $my_domain/different_page.php?".Session_Name()."=".Session_ID()); ?> I might not be safe (see sessions hijack), but it worked for me. Hope it will work for you, too. ---- Manual Page -- http://www.php.net/manual/en/function.session-start.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+51813 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+51813&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+51813&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+51813&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+51813&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+51813&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+51813&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#87867) next »