469,363 Members | 2,604 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,363 developers. It's quick & easy.

$HTTP_SESSION_VARS

Ok, I have this form that does a $PHP_SELF post, goes through error
checking, then redirects to loc( );

I am setting a session as follows:

if(!session_id()) {
session_start();
$sid = $PHPSESSID;
}

then I am doing post $PHP_SELF:

if ($form) {

if (!$ltype) {
$msg = "Please make a selection.";

} else {

session_register($ltype);

loc("index2.php?sid=$sid&ltype=$ltype");

}
}
Now I get a session ID just fine, but on index2.php I can only retrieve via
HTTP_GET_VARS, and HTTP_SESSION_VARS is blank. So what do I need to do to
access the session variable I am registering?

I am doing this on index2.php and still I get nothing. Am I regisering
variables wrong? I have Superglobals turned on in php.ini.

while (list ($key, $val) = each ($HTTP_SESSION_VARS)) {
print $key . " = " . $val . "<br>";
}
Jul 17 '05 #1
0 5433

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Alex Hopson | last post: by
2 posts views Thread by kublai khan | last post: by
reply views Thread by chhangru | last post: by
7 posts views Thread by Nicole | last post: by
12 posts views Thread by Michael Windsor | last post: by
3 posts views Thread by dheeraj4uuu | last post: by
3 posts views Thread by Shawn Northrop | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.