I’m trying to set up a session to maintain a login on a site I’m building. I’m new at PHP, but I’ve done some reading and I think my code is ok and it may be configuration-related. I need some help though, so any advice would be greatly appreciated. I minimized my code quite a bit in order to try to pinpoint the problem. Here are two files that I’ve been using:
logintest.php
[code]<?php
session_start();
$_SESSION[‘USERNAME’] = “blueliner”;
$_SESSION[‘FIRSTNAME’] = “Danny”;
echo "You are logged in as " . $_SESSION[‘FIRSTNAME’] . “
”;
?>
Go[/code]
test.php
[code]<?php
session_start();
echo "You are logged in as " . $_SESSION[‘FIRSTNAME’] . “
”;
?>[/code]
The first page displays exactly as I would expect, but when I click the link to get to the test.php page, the session variable doesn’t come up. The server on which I’m renting space is running PHP 4.4.7.
TIA