<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

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

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

