<?php
$host_bdd = '88.167.179.152';
$user_bdd = 'tp';
$pass_bdd = 'Mot2Passe!';
$base_bdd = 'chateau2';

session_start();
$connexion = new PDO('mysql:host='.$host_bdd.';dbname='.$base_bdd, $user_bdd, $pass_bdd);
if(@$_SESSION['user'])
{
	$result_infos_user = $connexion->query("SELECT * FROM  comptes WHERE pseudo='".$_SESSION['user']."'");
	$infos_user = $result_infos_user->fetch();
	if($_SESSION['token'] != $infos_user['token'])
	{
		$_SESSION['user'] = '';
		$_SESSION['token'] = '';
		$infos_user = 0;
	}
}

$result_nb_alertes = $connexion->query("SELECT count(*) FROM alertes WHERE acquitte='0'")->fetchColumn();
?>