Hi there,
I'm having a bit of trouble with session variables on a site.
Two variables are set when the user logs in, which are $session['email'] and $session['id'], here is the code from the login script...
$query = ("SELECT email, password, id, username, verified FROM user WHERE email='$email' AND password='$password' AND verified = 'y'");
$result= mysql_query($query);
$row= mysql_fetch_array($result, MYSQL_NUM);
if (mysql_num_rows($result)>0)
{
session_save_path("C:\Temp");
session_start();
$_SESSION['email']= $row[0];
$_SESSION['id']= $row[2];
This is setting the two variables in the session fine. On each page in the site, I then recall the session details with....
session_save_path("C:\Temp");
session_start();
...in the header.
There is a search page on the site which searches for other users, and when I click on a search result, both the session variables change to that of the user that I have clicked on.
Nowhere on the search results page, or the master details is there code that should be changing the session variables, so I can't figure out why it's changing...
Any thoughts?