Re: Session management issues

From: Date: Thu, 08 Nov 2001 19:30:04 +0000
Subject: Re: Session management issues
References: 1 2 3  Groups: php.windows 
Request: Send a blank email to php-windows+get-10308@lists.php.net to get a copy of this message
### This is the first page that sets the session <? session_start(); $query = "SELECT uid, uperms from users WHERE uname = '$frmuser' AND upass = PASSWORD('$frmpass')"; $result = mysql_db_query($database, $query, $connection) or die ("Error in query: $query. " . mysql_error()); if (mysql_num_rows($result) == 1) { session_register("SESSION_UID"); session_register("SESSION_UPERMS"); list($uid, $uperms) = mysql_fetch_row($result); $SESSION_UID = $uid; $SESSION_UPERMS = $uperms; header("Location:menu.php"); mysql_free_result ($result); mysql_close($connection); } else ### This is the session SESSION_UID|s:1:"1";SESSION_UPERMS|s:1:"1"; ### Again the code that is broken :( if(!session_is_registered("SESSION_UPERMS")) { header("Location: error.php?ec=1"); exit; } Im using UPerms is PHP 4.06 broken ??? Brendon

« previous php.windows (#10308) next »