RE: [PHP] RE:[PHP] sessions...how to use not clear?

From: Date: Mon, 22 Mar 2004 23:49:57 +0000
Subject: RE: [PHP] RE:[PHP] sessions...how to use not clear?
Groups: php.general 
Request: Send a blank email to php-general+get-181187@lists.php.net to get a copy of this message
Andy B <mailto:aborka1@wmis.net> on Monday, March 22, 2004 3:43 PM said: > as long as your usernames are unique you should never have a problem. > (assuming everything else works as planned.) > > it should... it will. a unique value is a unique value. > is this code valid?? > <?php > if(session_start($name)) {/*do whatever if person is logged in > already*/ } > else { > /*do whatever if session doesnt exist*/ > } > > if that does work then all i need to do is figure out how to do a > session_distroy() to delete it after logged out... > > any ideas? personally i've never named a session (let alone knew that it was possible) so i don't know if that code is valid as i don't know what, if anything, session_start returns. that code assumes session_start() returns a value at all. i suggest you read the manual. try www.php.net/session_start and it will tell you what that function returns if anything. you can work from there. chris.

« previous php.general (#181187) next »