<?php
    include("../connection.php");
    include("../user.php");
    $user=$_SESSION['user'];
?>
<link rel="stylesheet" href="../css/sweet-alert.css" /> 
<?php
	$name=$_REQUEST['name'];
	$status=$_REQUEST['sts'];
	$status_master=mysqli_query($con,"INSERT INTO `status_master`(`name`, `status_no`,`created_by`) VALUES ('$name','$status','$user')");
		//echo "INSERT INTO `status_master`(`name`, `status_no`,`created_by`) VALUES('$name','$status','$user')";
    if($status_master)
	{
	?>
	<script>
        setTimeout(function() {
            swal({
                title: "Successfully",
                text: "completed!",
                type: "success"
            }, function() {
             window.location = "status_master.php";
            });
        }, 100);
    </script>  
   <?php
	}	
	else
	{
	?>
	<script>
        setTimeout(function() {
            swal({
                title: "Not",
                text: "status Updated!",
                type: "error"
            }, function() {
            window.location = "status_master.php";
            });
        }, 100);
    </script> 	  
    <?Php
	}	
?>
<script src="../js/sweet-alert.js"></script>