Session Broken

From: Date: Thu, 08 Nov 2001 01:02:03 +0000
Subject: Session Broken
Groups: php.db 
Request: Send a blank email to php-db+get-14128@lists.php.net to get a copy of this message
Can anyone tell me why my session isn't working? I have attached the problem script. Without even going to another page, the $PHPSESSID and $UserName variables are both empty. They are also empty on subsequent pages. It starts with: ========================================================= <?php session_start(); session_register("UserName"); /*=====<< Check for New User Session >>=====*/ if(!isset($UserName)) { $UserName = "guest"; }; ========================================================== And toward the end, it has the following: ========================================================== function ShowMessage($message) { print "<br>\n"; print "<table border=2 align=center>\n"; print "<tr><td align=center><font color=yellow>$UserName ($PHPSESSID): $message</font></td></tr>\n"; print "</table>\n"; } ?> ========================================================== In this function, the variables are flat empty. --Matthew

« previous php.db (#14128) next »