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

$sql1 = "UPDATE unite SET
        uninom='$nom',
        uninomar='$nomar',
        updated_at='$d_update'
        where id='$id'";

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

?>
       
