I am currently working on an authentication system that was built before I took over the site. Everything was working fine, but all of a sudden the sessions are changing the id when I go to a particular page.
I have pages index.php, admin.php, set_order.php.
All three of the pages have session_start() at the top, and nothing before them.
The user logs in at index.php, and is redirected to admin.php. At this point the session stays the same. However, moving from admin.php to sort_order.php causes the session_id() to change, thus logging my users out. the set_order.php file is located in the 'scripts' directory.
Finally, this is the content of set_order.php.
<?php session_start(); if (isset($_GET['order'])) $_SESSION['order'] = $_GET['order']; header("Location ../admin.php"); ?>
When I echo out session_id() on that page, it's different.
Any help would be greatly appreciated. I'm about at my wits end here.
This post has been edited by akozlik: 06 October 2008 - 11:50 AM