note 49006 added to faq
| From: | zinmarwin at gmail dot com | Date: | Fri, 14 Jan 2005 11:09:51 +0000 |
| Subject: | note 49006 added to faq | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-83252@lists.php.net to get a copy of this message | ||
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.
----
Manual Page -- http://www.php.net/manual/en/faq.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+49006
Delete -- http://master.php.net/manage/user-notes.php?action=delete+49006&report=yes
Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+49006&report=yes&reason=bad+code
Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+49006&report=yes&reason=spam
Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+49006&report=yes&reason=useless+example
Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+49006&report=yes&reason=contains+commercial+links
Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+49006&report=yes&reason=useless+note
Reject -- http://master.php.net/manage/user-notes.php?action=reject+49006&report=yes
Search -- http://master.php.net/manage/user-notes.php