<?php
session_start();
$bdd = new PDO('mysql:host=localhost;dbname=####', '####', '####');
if(isset($_GET['id']) AND $_GET['id'] > 0 AND isset($_SESSION['id']) AND $_SESSION['id'] > 0)
{
$getid = intval($_GET['id']);
$requser = $bdd->prepare('SELECT * FROM membres WHERE id = '.$getid);
$requser->execute(array($getid));
$userinfo = $requser->fetch();
header("Location: indexauth.php");
}
else
{
?>
#### CODE HTML DE LA PAGE INDEX.PHP ####
<?php
}
?>