All pastes #191987 Raw Edit

Stuff

public text v1 · immutable
·published 2006-10-05 15:37 UTC
rendered paste body
session.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'];
?>