[ Jocelyn Ireson-Paine's Home Page | How to Call SWI-Prolog from PHP ]

Running a PHP Session

This script contains the same PHP code as Section PHP Sessions: Using PHP's isset Function of tizag.com's tutorial PHP Sessions - Why Use Them? Namely:

<?php
session_start();  
if(isset($_SESSION['views']))
    $_SESSION['views'] = $_SESSION['views']+ 1;
else
    $_SESSION['views'] = 1;

echo "views = ". $_SESSION['views']; 
?>

views = 1