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