I just dont get these 🙁
This is on one page..
// set the session up
session_start();
session_register("user_email");
session_register("user_name");
session_register("user_level");
session_register("user_logindate");
session_register("user_logintime");
session_register("user_id");
// now fill them with stuff!
$user_email = $query_data["EMail"]);
$user_name = $query_data["UserName"]);
$user_level = $query_data["UserLevel"]);
$user_logindate = $query_data["LastLoginDate"]);
$user_logintime = $query_data["LastLoginTime"]);
$user_id = $query_data["UserID"]);
Then i use javascript to open a window which loads another page, which contains:
session_start();
DisplayHeader("TM :: Administration");
echo("<H1>Control Panel</H1>\n");
echo("SessionID: $PHPSESSID\n");
echo("<TABLE WIDTH='85%' border='0'>\n");
echo("\t<TR>\n");
echo("\t\t<TD>Username:<br>" . $user_name . "</TD>\n");
echo("\t\t<TD>Email:<br>$user_email</TD>\n");
echo("\t\t<TD>Last Login:<br>$user_logindate $user_logintime</TD>\n");
echo("\t</TR>\n");
echo("</TABLE>\n");
(The DisplayHeader() function i wrote, and it displays all the
[head][/head][body] stuff as well as setting up headers for no caching)
On page 1, i can print out all the variables with their proper values, however, on page 2 all of the variables all bring up warnings, saying the variable is undefined?? Surely the session_start() should make php realise theres a session here and it should pull the variables out?? PHPSESSID is being passed ok, as i can print that out on page 2
Another point that ive noticed, is that in the session file itself, in /php/session_data is that the variable *names* are stored, but they have no values associated with them?
SOMEONE PLEASE HELP mE!
I'm going mad over these wretched things :(