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

date_default_timezone_set('Africa/Algiers');
$d_update=date('Y-m-d H:i:s');
$id=mysqli_real_escape_string($con,htmlspecialchars(trim($_POST['id']))) ;
$d_aj=date('Y-m-d H:i:s');
$ordre=mysqli_real_escape_string($con,htmlspecialchars(trim($_POST['ordre']))) ;
$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']))) ;


$sql1 = "UPDATE dparcours SET
        dprord='$ordre',
        dprponint='$destination',
        dprprix='$prix',
        dprkm='$km',
        dprheur='$heure',
        dprupdated_at='$d_update'
        where id='$id'";
      if(mysqli_query($con,$sql1)){echo 1; }else{
            echo 0;
            
               }
    }

?>
       
