Re: Session id's

From: Date: Sat, 02 Sep 2000 11:14:03 +0000
Subject: Re: Session id's
Groups: php.general 
Request: Send a blank email to php-general+get-14921@lists.php.net to get a copy of this message
Hey PHP'ers, Hmm, I'm a bit of a session newbie, and trying to get as far away from client side dependancies as possible I decided to remove all my cookie code from a Cart system I am writing and use sessions, my problem is that I am using sessions with thier default value so as a user hits the products page a new session is started session_start() then when a user adds a item to thier cart im am trying to insert the session id l by getting its value $CartUser = session_id(); and inserting it into the database the problem is $CartUser is empty, I also tried the constant $_SID_ as well same thing, now sessions are being saved to /tmp as per manual, so why can't I get the current session's id??? BTW: I am fluent in SQL so the INSERT command is NOT the problem, it has to be my complete non understanding of something that is suppose to real simple 'sessions' or my understanding of PHP's constants or somthing? Regards, Joseph

« previous php.general (#14921) next »