Sessions
| From: | Russell Anam | Date: | Sun, 22 Oct 2000 05:20:52 +0000 |
| Subject: | Sessions | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-21622@lists.php.net to get a copy of this message | ||
Hello,
I am building a shopping cart using PHP and it uses sessions to manage and
track users. I use URL to propagate the session ID.
I am using codes like:
<?
require("include.php");
if($ID)
session_id($ID);
session_start();
if (!$PHPSESSID)
{
session_register('user');
session_register('auth');
}
$cusession=session_id();
echo "To continue <A HREF=\"somepage.php?ID=$cusession\">click
here</A>"
?>
Now say someone comes to my site and has session ID of say 1234. So when he
roams my site the address will be something like
www.mydomain.com/page.php?ID=1234 . Now say he/she bookmarks this page and
it will be bookmarked as www.mydomain.com/page.php?ID=1234 . Now say after
few months another user comes to my site and gets the session ID of 1234 and
at that time the earlier client with his bookmark logs in. At this time both
will have the same session ID and will get all the variable of the other.
How can I overcome this problem? Is there any better way to handle sessions?
Any help will be appreciated.
Thanks in advance.
-Russell.
________________________________________________
The worst way to miss someone is to be sitting right beside them, knowing
you can't have them.