Sessions
| From: | Russell Anam | Date: | Thu, 26 Oct 2000 05:51:36 +0000 |
| Subject: | Sessions | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-22055@lists.php.net to get a copy of this message | ||
I am sending this again since I didn't get any response!!
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.