<?php session_start();
if(!empty($_SESSION['admin_connect_id']))
{ require('../../config.php');

date_default_timezone_set('Africa/Algiers');
$d_aj=date('Y-m-d H:i:s');
$ordre=mysqli_real_escape_string($con,htmlspecialchars(trim($_POST['ordre']))) ;
$idpar=mysqli_real_escape_string($con,htmlspecialchars(trim($_POST['idpar']))) ;
$prix=mysqli_real_escape_string($con,htmlspecialchars(trim($_POST['prix']))) ;
$km=mysqli_real_escape_string($con,htmlspecialchars(trim($_POST['km']))) ;
$heure=mysqli_real_escape_string($con,htmlspecialchars(trim($_POST['heure']))) ;
$destination=mysqli_real_escape_string($con,htmlspecialchars(trim($_POST['destinations']))) ;


$sql2 = "INSERT INTO dparcours (dprpar,dprord,dprponint,dprprix,dprkm,dprheur,dprcreated_at,dprupdated_at) VALUES 
('$idpar','$ordre','$destination','$prix','$km','$heure','$d_aj','$d_aj')";
if(mysqli_query($con,$sql2)){
  echo 1;
  } else {
/*echo 0;*/
echo mysqli_erreur();
 }

    }

?>