<?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']))) ;
/*$dstkm=mysqli_real_escape_string($con,htmlspecialchars(trim($_POST['dstkm']))) ;
$duree=mysqli_real_escape_string($con,htmlspecialchars(trim($_POST['duree']))) ;

*/
$wialya=mysqli_real_escape_string($con,htmlspecialchars(trim($_POST['wialya']))) ;


$sql1 = "UPDATE destinations SET
        dstnom='$nom',
        dstnomar='$nomar',
        dstwilaya='$wialya',
        updated_at='$d_update'
        where id='$id'";

            if(mysqli_query($con,$sql1)){echo 1; }else{
            /*  echo 0;*/
             echo mysqli_error($con);
               }
    }

?>
       
