session variables not registering
Posted: Tue Jul 05, 2005 4:05 pm
i first encountered the problem of having session variables not pass between documents while trying to build an authentication program for a site im building. nothing i tried could get it to work. i then attempted this script:
next.php:
i get no output whatsoever. im thinking its a php.ini problem. its driving me crazy.
i also tried using $sessvar instead of $HTTP_SESSION_VARS["sessvar"] after i saw that register_globals was on.
Code: Select all
<?
session_start();
session_register("sessvar");
$sessvar="qwerty";
echo($sessvar);
?>
<a href="next.php">next</a>Code: Select all
<?
session_start();
echo($HTTP_SESSION_VARS["sessvar"]);
?>i also tried using $sessvar instead of $HTTP_SESSION_VARS["sessvar"] after i saw that register_globals was on.