<link rel="stylesheet" href="../css/sweet-alert.css" /> 


<?php 
include("../connection.php");
include("../user.php");
$user=$_SESSION['user'];
$cur_date=date('Y-m-d H:i:s');

?>

<?php

	
	$loc=$_REQUEST['location'];
	$loc_des=$_REQUEST['loc_des'];
	
		$loct=mysqli_query($con,"INSERT INTO `location_master`(`location`,`location_description`,`status`, `created_on`, `created_by`) VALUES ('$loc','$loc_des','0','$cur_date','$user')");
if($loct)
	{
	?>
	<script>
	
	
    setTimeout(function() {
        swal({
            title: "Successfully",
            text: "Location Created!",
            type: "success"
        }, function() {
        window.location = "location_master.php";
        });
    }, 100);
</script>  
    <?php
	}	
	else
	{
	?>
	<script>
    setTimeout(function() {
        swal({
            title: "Not",
            text: "Location Created!",
            type: "error"
        }, function() {
         window.location = "location_master.php";
        });
    }, 100);
</script> 	  
	<?Php
	}	
?>

  <script src="../js/sweet-alert.js"></script>

