Examples now use session_start();

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@78854 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Sander Roobol 2002-04-19 16:49:59 +00:00
parent bc1a5e5dc1
commit 746ef0c5e9

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<reference id="ref.session">
<title>Session handling functions</title>
<titleabbrev>Sessions</titleabbrev>
@ -82,6 +82,7 @@
<programlisting role="php">
<![CDATA[
<?php
session_start();
if (isset($HTTP_SESSION_VARS['count'])) {
$HTTP_SESSION_VARS['count']++;
}
@ -109,6 +110,7 @@ else {
<programlisting role="php">
<![CDATA[
<?php
session_start();
// Use $HTTP_SESSION_VARS with PHP 4.0.6 or less
if (!isset($_SESSION['count'])) {
$_SESSION['count'] = 0;
@ -126,9 +128,9 @@ if (!isset($_SESSION['count'])) {
<programlisting role="php">
<![CDATA[
<?php
session_start();
// Use $HTTP_SESSION_VARS with PHP 4.0.6 or less
unset($_SESSION['count']);
?>
]]>
</programlisting>