<?

include 'connect_sql.php';
include 'membres.php';

$expire = 365*24*3600;

if ($_GET['deco']) {

	$bon = 0;
	
	setCookie("pseudo","0",time()+$expire);

setCookie("password","0",time()+$expire);
}

if (($index) || (!$_COOKIE['pseudo']) || (!$_COOKIE['password'])) {

	$bon = 1;

	$pseudo = $_POST['pseudo'];
	$password = $_POST['password'];
	
	setCookie("pseudo","$pseudo",time()+$expire);

setCookie("password","$password",time()+$expire);

} else {

	$bon = 1;

	$pseudo = $_COOKIE['pseudo'];
	$password = $_COOKIE['password'];	
}

if (!$index) {
	
		header("location: jouer_partie.php");

} 
?>
