Stuff
public text v1 · immutablesession.php
<?php
session_start();
if(isset($_SESSION['foo'])) { echo '$_SESSION[\'foo\'] is set, unsetting.';
unset($_SESSION['foo']); } else { echo '$_SESSION[\'foo\'] is not set, setting.';
$_SESSION['foo'] = 'bar';
Print '<form action=session2.php method=POST>';
Print '<input type=submit name=submit value=submit>';
}
?>
session2.php
<?
session_start();
Print $_SESSION['foo'];
?>