note 37267 added to function.session-is-registered
| From: | sorr at seeessyouellbee dot edu | Date: | Fri, 07 Nov 2003 20:41:02 +0000 |
| Subject: | note 37267 added to function.session-is-registered | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-60120@lists.php.net to get a copy of this message | ||
The previous comment is bad code. Don't copy it.
Here is a better code block. Copy this.
===================================
<?php
// Start session and set variable.
session_start();
$_SESSION['theSESSIONvarName'] = "is_set";
// Check if the session is set.
if(isset($_SESSION['theSESSIONvarName']))
{
$sid = session_id();
echo "<html>";
echo "<head><title>PHP Session Is Set!</title></head>";
echo "<body><p>The session is set! The PHPSESSID is:
$sid</p></body>";
echo "</html>";
}
else
{
echo "<html>";
echo "<head><title>PHP Session Is NOT Set!</title></head>";
echo "<body><p>The session is NOT set! Check your server configuration or
version.</p></body>";
echo "</html>";
}
?>
----
Manual Page -- http://www.php.net/manual/en/function.session-is-registered.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+37267
Delete -- http://master.php.net/manage/user-notes.php?action=delete+37267&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+37267&report=yes
Search -- http://master.php.net/manage/user-notes.php