Reply to Re: Session termination issue

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация