Your IP : 216.73.216.162


Current Path : /home/xbodynamge/crosstraining/reservation/admin/
Upload File :
Current File : /home/xbodynamge/crosstraining/reservation/admin/action_stype.php

<?php
include_once('init.inc.php');

if ($_POST['type']=="new"){

echo $sql = "insert into reservation".$DB_prefixtable."seance_type (salle, jour, heure_debut, heure_fin, type_seance, nb_max_participant) value ('".$_POST['salle']."','".$_POST['jour']."','".$_POST['heure_debut']."','".$_POST['heure_fin']."','".$_POST['type_seance']."',".$_POST['nb_max_participant'].")";
$req = mysqli_query($db, $sql) or die('Erreur SQL !'.mysqli_error());

header('Location: page_stype.php'); 
  
}


if ($_POST['type']=="modif"){

echo $sql = "update reservation".$DB_prefixtable."seance_type set salle='".$_POST['salle']."', jour='".$_POST['jour']."', heure_debut='".$_POST['heure_debut']."', heure_fin='".$_POST['heure_fin']."', type_seance='".$_POST['type_seance']."', nb_max_participant=".$_POST['nb_max_participant']." where id=".$_POST['id'];
$req = mysqli_query($db, $sql) or die('Erreur SQL !'.mysqli_error()); 

header('Location: page_stype.php'); 
  
}

if ($_POST['type']=="remove"){

echo $sql = "delete from reservation".$DB_prefixtable."seance_type where id=".$_POST['id'];
$req = mysqli_query($db, $sql) or die('Erreur SQL !'.mysqli_error());

header('Location: page_stype.php'); 
  
}
  



?>