<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

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

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

