Re: Newbie - Can't get sessions to work
| From: | John Nichel | Date: | Wed, 22 Oct 2003 18:39:05 +0000 |
| Subject: | Re: Newbie - Can't get sessions to work | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-167145@lists.php.net to get a copy of this message | ||
Daniel Guerrier wrote:
The second page should be
<?php
session_start();
echo { $_SESSION['foo'] . "<BR>\n");
echo { $_SESSION['bar'] };
?>
you're missing the session_start()
You need it on every page that you plan to use session
on.
He has session_start() on page two.
<snip>
-- By-Tor.com It's all about the Rush http://www.by-tor.compage2.php ---------- <?php session_start(); echo "foo = {$_SESSION['foo']}"; echo "bar = {$_SESSION['bar']}"; ?>Same here.... <?phpecho { $_SESSION['foo'] . "<BR>\n"); echo { $_SESSION['bar'] };?> </snip>