<?php session_start();
if(!empty($_SESSION['admin_connect_id']))
{ require('../../config.php');
$added_by=$_SESSION['admin_connect_id'];
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']))) ;


$sql2 = "INSERT INTO unite (uninom,uninomar,added_by,created_at,updated_at) VALUES ('$nom','$nomar','$added_by','$d_aj','$d_aj')";

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

    }

?>