Hello all,
I wondered if anyone could offer me some guidance, I wrote this script
using the dzsoft php editor, which links to php.exe and a internal
server.
Though when I run the code the session files are created, but the item
number in the files never increase beyond (0).
I just wondered if there was anyone options in the php.ini I could
change, to allow this premission. Or any session option I could add to
the code.
Many thanks
<?php
error_reporting(E_ALL);
ini_set('display_errors', '1');
session_save_path('c:\\');
session_start();
if (!isset($_SESSION['item1'])) $_SESSION['item1'] = 0;
if (!isset($_SESSION['item2'])) $_SESSION['item2'] = 0;
if(isset($_GET['Item1'])){
$_SESSION['item1']++;
}
if(isset($_GET['Item2'])){
$_SESSION['item2']++;
}
?>
<html>
<head>
<title>Test Page</title>
</head>
<body>
<form>
<input type="submit" name="Item1" value="Item 1">
<input type="submit" name="Item2" value="Item 2">
<p>Number of Item 1 clicks: <?php echo $_SESSION['item1']; ?></p>
<p>Number of Item 2 clicks: <?php echo $_SESSION['item2']; ?></p>
</form>
</body>
</html>