|
Posted by TristaSD on 06/20/06 15:11
Thanks, all. It seems to work now, but some things are still very odd.
For example, when I go to www.mysite.com/session, I get "session
doesn't exist". When I refresh, however, I get the session id. I get
the session ID when I go to www.mysite.com/session/index.php directly.
Is it a default page issue? Why is the session started when I go to
index.php, but not /session/ ?
Here's the code:
*** index.php ***
<?session_start();?>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Session Testing</title>
</head>
<body>
<? echo ($PHPSESSID ? "Session $PHPSESSID exists. You can now <a
href=\"logout.php\">log out</a>." : "Session does not exist."); ?>
</body>
</html>
*** logout.php ***
<?session_start();
session_destroy();
//header("Location: index.php");
echo "Session destroyed.";
exit;?>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Session Destrustion</title>
</head>
<body>
</body>
</html>
[Back to original message]
|