Hi,
I have two very simple php scripts and the second srcipt is not seeing the
variables session_registered by the first script.
I'm running PHP-4.3.1. And have both "register_globals" and
"track_vars" set to "ON".
Well, the first script prints out the session var fine, but not the second
one. As well I used session_is_registered("sess_var") to check if "sess_var"
is registered in the second script and it says "false". What is wrong? Is
there something else I overlooked? Thanks for your
help!
1st script - page1.php:
<?
session_start();
session_register("sess_var");
$sess_var = "Hello world!";
echo "The content of \$sess_var is $sess_var<br>";
?>
<a href = "page2.php">Next page</a>
2nd script - page2.php:
<?
session_start();
if (session_is_registered("sess_var"))
{ echo "true<br><br>";}
else
{echo "false<br>";}
echo "The content of \$sess_var is $sess_var<br>";
session_unregister("sess_var");
?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php