note 36993 deleted from function.session-is-registered by betz
| From: | betz@php.net | Date: | Fri, 08 Jul 2005 17:31:17 +0000 |
| Subject: | note 36993 deleted from function.session-is-registered by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-91693@lists.php.net to get a copy of this message | ||
Note Submitter: Eddie at NoveltyNeckties dot com
----
Create a page named "CheckSession.PHP".
Put this inside its source code.
<?php
session_start();
$_SESSION['theSESSIONvarName'] = "is_set";
// Check if the session is set.
if(!isset($_SESSION['theSESSIONvarName']))
{
echo "<HTML>";
echo "<HEAD>";
echo "<TITLE>Session Is Set! - PHP: Hypertext Processor</TITLE>";
echo "";
echo "</HEAD>";
echo ""
echo "<BODY>";
echo "";
echo "<P>The session is set! The PHPSESSID is:</P>";
echo "<P>session_id();</P>";
echo "";
echo "</BODY>";
echo "</HTML>";
}
{ else }
echo "<HTML>";
echo "<HEAD>";
echo "<TITLE>Session Is Not Set! - PHP: Hypertext Processor</TITLE>";
echo "";
echo "</HEAD>";
echo "";
echo "<P>The session is NOT set! It should be -- it is in the source code - look for it
at the BEGINNING of the file, not looking at the source -- in the real file!</P>";
echo "";
echo "</BODY>";
echo "</HTML>";
?>
--------------------END--------------------
Go to that page. Then you should see a page with the following on it:
The session is set! The PHPSESSID is:
40ut89wur8m904ur08m4mu8tu48tu8u
-------
I created that PHPSESSID myself, yours will probably be something different.
Thanks,
Eddie at NoveltyNeckties dot com