<?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']))) ;
$nom=mysqli_real_escape_string($con,htmlspecialchars(trim($_POST['nom']))) ;
$nomar=mysqli_real_escape_string($con,htmlspecialchars(trim($_POST['nomar']))) ;

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

$sql1 = "UPDATE parcours SET
        parnom='$nom',
        parnomar='$nomar',
        parunite='$unite',
        pardest='$destination',
        parupdated_at='$d_update'
        where id='$id'";
      if(mysqli_query($con,$sql1)){echo 1; }else{
            echo 0;
            
               }
    }

?>
       
