Hello All,
I am starting to play with PHP again. It has been a long while since I have done this. My problem is this: I have a page that assigns a session variable like this
$_SESSION['EMail']= $row->Email;
I then have another page that is accessed via two header("location: settings. To ellaborate a little on this the first page takes a persons email and password to see if it is valid. Once it is, it then uses the header("location: to in an if statement to send the person to the main password protected page. At the top of this page I check to see if the password is set to the defualt password, if it is I use a second header("location: to send the person to a page to change the password.
This all works but when I end up on the password change page the session variable seems to have vanished. I have the following code in the system to check it:
Current EMail: <?php echo $_SESSION['EMail']; ?>
This seems to show the variable as either blank or NULL.
If I go to the server where the sessions are stored and open the session up using notepad, I can see the email. So it seems like the session is started but I am loosing the connection to it or something similar. Any ideas on what I am doing wrong?
Thanks!
I am starting to play with PHP again. It has been a long while since I have done this. My problem is this: I have a page that assigns a session variable like this
$_SESSION['EMail']= $row->Email;
I then have another page that is accessed via two header("location: settings. To ellaborate a little on this the first page takes a persons email and password to see if it is valid. Once it is, it then uses the header("location: to in an if statement to send the person to the main password protected page. At the top of this page I check to see if the password is set to the defualt password, if it is I use a second header("location: to send the person to a page to change the password.
This all works but when I end up on the password change page the session variable seems to have vanished. I have the following code in the system to check it:
Current EMail: <?php echo $_SESSION['EMail']; ?>
This seems to show the variable as either blank or NULL.
If I go to the server where the sessions are stored and open the session up using notepad, I can see the email. So it seems like the session is started but I am loosing the connection to it or something similar. Any ideas on what I am doing wrong?
Thanks!