Sessions - Am I missing something
Posted: Sun May 23, 2004 1:27 pm
As I understand it, once a session variable is set, it is set as long as the browser is left open, right?
So with this code:
When the page is first loaded, it displays en empty line, then "hello", as it should.
However, when I referesh the page, surely it should print "hello" twice? Why doesn't it? Is this a php bug? Am I missing something?
So with this code:
Code: Select all
session_start;
print($_SESSIONї'test']."<br>");
if(!isset($_SESSIONї'test']))
{
$_SESSIONї'test'] = "hello";
}
print($_SESSIONї'test']."<br>");However, when I referesh the page, surely it should print "hello" twice? Why doesn't it? Is this a php bug? Am I missing something?