Only one works
| From: | LinuxGeek | Date: | Tue, 18 Mar 2003 01:50:35 +0000 |
| Subject: | Only one works | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-140070@lists.php.net to get a copy of this message | ||
Hi,
I am having a problem with one of my session variables, no matter what I try I can't get a second one to register. My webpage calls this script directly and I am using the webpage form variables for the variables in this script. I can register the Name variable but not the LoginName variable.
What am I doing wrong??
Here is complete script:
<?
require_once ( "DBFunctions.php" );
#Make DB Connection
$result = makeconnection();
if( $result )
{
#validate the user
$Name = validuser("$LoginName", "$PWord");
if( strlen($Name) > 0 )
{
#start a session and register the user and limit the session to one hour
#session_cache_expire(60);
session_start();
#here is where I check for registered sessions and registered users
if(! session_is_registered("Name")) // this works as expected
{
session_register("Name");
}
if(! session_is_registered("LoginName"))
{
session_register( "LoginName" ); // this does not work.
}
header("Location: http://www.xxxxxxxxxx.com/xxxxxxx/xxxxxxxx.php");
}
else
{
header("Location: http://www.xxxxxxxx.com/xxxxxxxx/");
exit();
}
}
else
{
#session_unset();
session_destroy();
echo "Problem with database.";
exit();
}
?>