<?php
include("../../db.php");
error_reporting(E_ALL);
header("Access-Control-Allow-Origin: * ");

    $status = 0;
    $msg    = '';
    $aryData=array(
            "name"      =>  "$_POST[name]",
            "mobile"    =>  "$_POST[mobile]",
            "address"   =>  "$_POST[address]",
            "image"     =>  "$_POST[image]",
        );

    if($_POST['name']!=""){
  	    $flgIn = $db->insertAry("security", $aryData);
  	    
  	    if($flgIn > 0){
  	        $status = 1;
  	        $msg    = "Data saved successfully.";
  	    }
  	    else {
  	        $msg    = "Something went wrong. Please try again.";
  	    }
    }
    else {
        $msg    = "Please enter name.";
    }

    echo json_encode(array('status' => $status, 'msg'=>$msg));
?>