| Current Path : /home/xbodynamge/namtation/reservation/ |
| Current File : /home/xbodynamge/namtation/reservation/auth.php |
<?php
include_once('./inc/init.inc.php');
echo $sql = "SELECT id, count(*) as auth_status from reservation".$DB_prefixtable."client where email ='".$_POST['email']."' and mdp='".$_POST['mdp']."' and webaccess=1";
#$req = mysql_query($sql) or die('Erreur SQL !'.mysql_error());
$req = mysqli_query($db, $sql) or die('Erreur SQL !'.mysqli_error());
$data = mysqli_fetch_assoc($req);
if ($data['auth_status']==1){
$_SESSION['id_client']=$data['id'];
header('Location: reservation.php');
}
else{
header('Location: index.php?error=1');
}
mysql_close();
?>