<?php
$response = array();
  
	$NAME = $_POST['NAME'];
	$CATEGORIE = $_POST['CATEGORIE'];
	$ACTIVITY = $_POST['ACTIVITY'];
	$ADRESS = $_POST['ADRESS'];
	$COMMUN = $_POST['COMMUN'];
	$WILAYA = $_POST['WILAYA'];
	$TEL = $_POST['TEL'];
	$FAX = $_POST['FAX'];
	$LA = $_POST['LA'];
	$LO = $_POST['LO'];
    
require_once dirname(__FILE__) . '/db_connect.php';

$db = new DB_CONNECT();
    
$result = mysql_query("INSERT INTO hopitaux(NAME, CATEGORIE, ACTIVITY, ADRESS, COMMUN, WILAYA, TEL, FAX, A, LA, LO)
 VALUES('$NAME', '$CATEGORIE', '$ACTIVITY', '$ADRESS', '$COMMUN', '$WILAYA', '$TEL', '$FAX', '0','$LA', '$LO')");
    
if ($result) {
        
$response["success"] = 1;
        
$response["message"] = "Product successfully created.";
        
echo json_encode($response);
    
}
 else {
        
$response["success"] = 0;
        
$response["message"] = "Oops! An error occurred.";
        
echo json_encode($response);
    }
?>