<?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']))) ;

$heure=mysqli_real_escape_string($con,htmlspecialchars(trim($_POST['heure']))) ;
$unite=mysqli_real_escape_string($con,htmlspecialchars(trim($_POST['unite']))) ;
$destinations=mysqli_real_escape_string($con,htmlspecialchars(trim($_POST['destinations']))) ;
$parcours=mysqli_real_escape_string($con,htmlspecialchars(trim($_POST['parcours']))) ;
$client=mysqli_real_escape_string($con,htmlspecialchars(trim($_POST['client']))) ;

$sql1 = "UPDATE planning SET
        plndest='$destinations',
        plnclient='$client',
        plnheure='$heure',
        plnunite='$unite',
        plnpar='$parcours',
        plnupdated_at='$d_update'
        where id='$id'";
      if(mysqli_query($con,$sql1)){echo 1; }else{
            echo 0;
            
               }
    }

?>
       
