1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| <?php
if (isset($_SESSION['nom']) AND isset($_SESSION['prenom']) AND isset($_SESSION['code_securite']))
{
include('ouverture_bd.php');
$sql = "SELECT code_securite_admin FROM administrateur GROUP BY code_securite_admin;";
$req = mysql_query($sql) or die('Erreur SQL !'.$sql.'<br>'.mysql_error());
while ($row = mysql_fetch_row($req))
{
$code_securite=$row[0];
}
if($code_securite!=$_SESSION['code_securite'])
{
header("location:index.php?page=authentification");
}
include('fermeture_bd.php');
}
else
{
header("location:index.php?page=authentification");
}
?> |