Thanks Kirk! I have all of the conditions you set out met. And still doesn't
work.
I also added session__is_registered("sess_var") to check and it tells me
that it's not registered.
1st script - page1.php:
<?
session_start();
session_register("sess_var");
$sess_var = "Hello world!";
echo "The content of \$sess_var is $sess_var<br>"; //echos fine here
?>
<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>"; //$sess_var NOT printed
echo "sess_var = $_SESSION[sess_var]<br>";
session_unregister("sess_var");
?>
"Kirk Johnson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> > Thanks. I'm using PHP-4.3.1.
> >
> > The problem is not with $_SESSION. I used
> > session_is_registered("sess_var");
> > to check from the second script and cannot see the
> > variable("sess_var"). Can
> > anyone tell me why?
>
> Your code should work for register_globals "on". Check that:
>
> - php.ini is where it is supposed to be (/usr/local/lib/, I think).
> - register_globals is really to set to on in php.ini.
> - that cookies are enabled in your browser.
> - you don't have an .htaccess file in your directory with register_globals
> turned off in it.
>
> Kirk
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php