note 49006 rejected from faq by nlopess

From: Date: Fri, 14 Jan 2005 19:37:19 +0000
Subject: note 49006 rejected from faq by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-83298@lists.php.net to get a copy of this message
Note Submitter: zinmarwin at gmail dot com ---- I am using PHP sessions and $_SESSION["varName"]. I am trying to accomplish this: When a user buy an item onto my website, he is registered for a session as "session_start() and $_SESSION["varName"]". When the sessions registers, he can view all of his items in shopping cart. i divided two file for adding item to Database as "add_cart.php" and querying from Database as "view_cart.php". so i used "session_start()" in both file. when he buy an item i call both of file. when he want to view his basket in any time he can click view_basket icon. in this case i call only "view_cart.php" My problem is startting now. there has warning "A session had already been started - ignoring session_start() in...." after buying an item. His session will still exist, but I don't know how to check that the user session is start or not.

« previous php.notes (#83298) next »