Currently, IF a user logs in to my website, they are assigned session data via this code:
global $userid, $sess_id, $user_sid;
$userid=mysql_result($result,0,UserID);
// Initialize the Session Data ************************
$user_sid = session_id();
session_name("CSID");
session_start();
$sess_id = "$user_id";
session_register('userid');
session_register('sess_id');
THEN after this data has been stored or when the main page is loaded, this snippet of code is present at the TOP of the page:
session_name("CSID");
session_start();
For some reason, when I click on another page link the session data isn't passed.
My site is structured whereas the main page (index.php) includes other pages - but the important thing to remember is that the index.php is called for each page and link as a primary template. I use tables within index.php to pull in other pages in.
Any idea what I'm doing wrong? I though about storing the sessionid (SID) in the user database and then comparing them when the page is reloaded, but I'm having trouble assigning a variable to the session_id(); function.
Any suggestions?