Use $_SESSION superglobal instead of assuming register_globals = On

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@129915 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Joey Smith 2003-06-03 03:50:52 +00:00
parent 9d4667b37f
commit 0c5494bd00

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.37 $ -->
<!-- $Revision: 1.38 $ -->
<reference id="ref.session">
<title>Session handling functions</title>
<titleabbrev>Sessions</titleabbrev>
@ -268,12 +268,11 @@ session_unregister('count');
<programlisting role="php">
<![CDATA[
<?php
if (!session_is_registered('count')) {
session_register("count");
$count = 0;
if (! isset($_SESSION['count'])) {
$_SESSION['count'] = 1;
}
else {
$count++;
$_SESSION['count']++;
}
?>
]]>