le 14/03/2008 à 18:58
Page administrateur
cela doit marcher mais, je doit changer ma page index alors car a chaque fois que je veut me conecter il me redirige vers index
<?php
session_start();
if (!isset($_SESSION['login']))
{
header ('Location: membre.php');
exit();
}
if(isset($_SESSION['login'])) $auth = $_SESSION['rang'];
else $auth = 3;
if ($auth_necessaire < $auth) return false;
?>
<html>
<head>
<title>Espace membre</title>
</head>
<body>
Bienvenue
admin
<p>
<a href="deconnexion.php">Déconnexion</a>
</body>
</html>
<?php
session_start();
if (!isset($_SESSION['login']))
{
header ('Location: membre.php');
exit();
}
?>
<html>
<head>
<title>Espace membre</title>
</head>
<body>
Bienvenue
<?php
if ($tableau['rang'] == 0) echo 'membre';
elseif ($tableau['rang'] == 3) echo 'modérateur';
?>
<p>
<a href="deconnexion.php">Déconnexion</a>
</body>
</html>
Chargement en cours