note 44731 rejected from function.session-start by tomsommer

From: Date: Sat, 14 Aug 2004 20:00:30 +0000
Subject: note 44731 rejected from function.session-start by tomsommer
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-74640@lists.php.net to get a copy of this message
Note Submitter: karelnijs@hotmail.com ---- 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 ...

« previous php.notes (#74640) next »