note 36993 added to function.session-is-registered

From: Date: Thu, 30 Oct 2003 02:20:41 +0000
Subject: note 36993 added to function.session-is-registered
Groups: php.notes 
Request: Send a blank email to php-notes+get-59505@lists.php.net to get a copy of this message
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 ---- Manual Page -- http://www.php.net/manual/en/function.session-is-registered.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+36993 Delete -- http://master.php.net/manage/user-notes.php?action=delete+36993&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+36993&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#59505) next »