[solved] A session that is... well, not working
Posted: Tue Aug 02, 2005 7:09 am
Hi all,
I have a set of user registration pages that takes input via a form, passes data to the session and then has a bunch of php pages that do checks on the data in the session.
I have a particularly strange situation hapening, where I write data to the session with this code:
which works fine, as reading it with this code:
outputs the following:
(noting that the contents of $pass2 was of course, '0';)
Now what's hapening (the problem) is I have a page that reloads upon a problem to show the user their choices again so they can ammend their mistakes/fill in blanks etc.
The problem is, when I do a:
on that page, well, it doesn't do it. So upon looking into it further, if I try and do an echo of what's in the session on that same page, it shows nothing. IE: if I were to do this:
then I get nada. nothing. zilch 
It's so strange, seeing as another page (my read the session test page) can perform that same command and actually echo the contents, but on this page, it can't.
Can anybody point me in the correct direction or give me some ideas I can much about with?
I'd really appreciate it.
Thanks so much.
Rob
I have a set of user registration pages that takes input via a form, passes data to the session and then has a bunch of php pages that do checks on the data in the session.
I have a particularly strange situation hapening, where I write data to the session with this code:
Code: Select all
$_SESSION['registration_details']['stage_2_pass'] = $pass2;Code: Select all
echo "<br>stage_2_pass is ".$_SESSION['registration_details']['stage_2_pass']."<br>";Code: Select all
stage_2_pass is 0Now what's hapening (the problem) is I have a page that reloads upon a problem to show the user their choices again so they can ammend their mistakes/fill in blanks etc.
The problem is, when I do a:
Code: Select all
if ($_SESSION['registration_details']['stage_2_pass'] == "0")
{
//do stuff
}Code: Select all
echo "stage_2_pass = ".$_SESSION['registration_details']['stage_2_pass']."<br>";It's so strange, seeing as another page (my read the session test page) can perform that same command and actually echo the contents, but on this page, it can't.
Can anybody point me in the correct direction or give me some ideas I can much about with?
I'd really appreciate it.
Thanks so much.
Rob