note 44731 added to function.session-start

From: Date: Sat, 14 Aug 2004 19:57:58 +0000
Subject: note 44731 added to function.session-start
Groups: php.notes 
Request: Send a blank email to php-notes+get-74639@lists.php.net to get a copy of this message
i've tried all the thing different people say about IE6 and sessions and have *finally* come up with a solution (which actually is a combination of them all!) picture: you want to log in from login.php and you redirect (after checking pass etc) to menu.php on top of menu.php there should stand: [code] <?php header("Cache-control: private"); if (!session_id("mysession")){ session_start(); session_name(); } //CHECK IF LOGGED IN if(isset($_SESSION['ses_uid']) == FALSE || isset($_SESSION['ses_level']) == FALSE) header("Location: ../PHP/login.php"); ?> [/code] before i used "session_name()" in combination with isset(...) once one (!) user was logged in and you would open the website on another PC, you would be immediately logged in, as thát user! i hope i'm helping anyone with this snippet ... ---- Manual Page -- http://www.php.net/manual/en/function.session-start.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+44731 Delete -- http://master.php.net/manage/user-notes.php?action=delete+44731&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+44731&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#74639) next »