undefined variable...working in PHP 4.1.2 not 4.2.1
| From: | Joshua E Minnie | Date: | Thu, 23 May 2002 15:30:45 +0000 |
| Subject: | undefined variable...working in PHP 4.1.2 not 4.2.1 | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-98931@lists.php.net to get a copy of this message | ||
Hey all,
I am having a problem that maybe some of you have had as well. I am
using a session and when I pass the session variable to the next page it
comes back as undefined. Is there some new syntax in 4.2.1 that I am
missing, I thought that I made all the necessary changes. Here is the
entire script:
<?php
session_start();
if(!session_is_registered("user")) {
header("Location: http://localhost/denied.htm");
exit;
}
?>
[snip] HTML CODE [snip]
<?php echo $user;?>
[snip] MORE HTML CODE [snip]
I am getting the error at the echo statement between the HTML code, saying
that $user is undefined. The previous page does register user.
I am running PHP 4.2.1-CGI, IIS 5, W2K SP2.
-josh