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();
}
?>



-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to