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

	$id=$_REQUEST['id'];
		$loct=mysqli_query($con,"UPDATE `location_master` SET `location`='$loc',`location_description`='$loc_des',`status`='0',`modified_on`='$cur_date',`modified_by`='$user' WHERE `id`='$id'");
if($loct)
	{
	?>
	<script>
	
	
    setTimeout(function() {
        swal({
            title: "Successfully",
            text: "Location updated!",
            type: "success"
        }, function() {
      window.location = "location_master.php";
        });
    }, 100);
</script>  
    <?php
	}	
	else
	{
	?>
	<script>
    setTimeout(function() {
        swal({
            title: "Not",
            text: "Location updated!",
            type: "error"
        }, function() {
         window.location = "location_master.php";
        });
    }, 100);
</script> 	  
	<?Php
	}	
?>

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

