<?php

	session_start();
	
	if( isset($_SESSION['test']) ) {
	
		echo "La session est active!<BR>";
		
		echo "elle contient : " . $_SESSION['test'];
		
		
		foreach($_SESSION as $p => $v) {
		
				echo " nom=" . $p . ", param=" . $v;
		}
		
?>

<br/>
<a href="?logout">Déconnexion</a>

<?php		
	} else {
	
		echo "la session n'est pas active !";
	}
	
	if(isset($_GET['logout'])) {
		session_unset();
		header('Location: ?');
	}
	
?>

	
	
	