tested the $HTTP_SESSION_VARS prior to sending, set just fine. changed the next page to php and tested for the session var... nothing.
[in login.php] <? session_start(); # database check in here if(match){ $HTTP_SESSION_VARS["UserID_session"]=$txtUserID; #from form field for user $HTTP_SESSION_VARS["UserNum_session"]=$databaseresult; # from database result for user number header("Location: successlogin.php"); # or .htm - changed this to test if var was being passed exit; }else{ header("Location: wrongpassword.htm"); exit; } ?> [in successlogin.php] <? echo $HTTP_SESSION_VARS["SellerID_session"]; ?> if I check session_id() - it is the same in both pages. Variables just aren't getting stored/retrieved. ideas? as an aside, how do you destroy/start a new session with new session id? or do you just destroy the variables then use the same session id for the new session? Dave >Did you test and make sure the variable is set? >login.php > session_start(); > $HTTP_SESSION_VARS["username"]=$formUserName; > echo $HTTP_SESSION_VARS["username"] > header("Location: displaypage.htm"); > >Also, for grins ang giggles, make the middle page in the chain a HP, start >the session and test for the variable. If it does not work then the problem >is not the middle page being html. >Subject: [PHP] Sessions and switching between php and htm documents > > >login.htm > form submits information > >login.php > session_start(); > $HTTP_SESSION_VARS["username"]=$formUserName; > header("Location: displaypage.htm"); > >displaypage.htm > show some static stuff > links to formpage.htm > >formpage.htm > form submits information to form.php > >form.php > session_start(); > echo $HTTP_SESSION_VARS["username"]; <- has no value > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php