<?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');
$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']))) ;
$added_by=$_SESSION['admin_connect_id'];

$sql2 = "INSERT INTO destinations (dstnom,dstnomar,dstwilaya,added_by,created_at,updated_at) VALUES 
('$nom','$nomar','$wialya','$added_by','$d_aj','$d_aj')";

  if(mysqli_query($con,$sql2)){
  echo 1;
  } else {


echo 0;
 }

    }

?>