<?php 
    include("../connection.php");
    include("../user.php");
    $user=$_SESSION['user'];
?>
<link rel="stylesheet" href="../css/sweet-alert.css" /> 
<?php
	$fullname=$_REQUEST['fullname'];
	$username=$_REQUEST['username'];
	$email=$_REQUEST['email'];
	$password=md5($_REQUEST['password']);
	$gender=$_REQUEST['gender'];
	$user_master=mysqli_query($con,"INSERT INTO `user_master`(`user_name`, `password`, `full_name`, `email_id`, `gender`, `status`) VALUES('$username','$password','$fullname','$email','$gender','0')");
	
    if($user_master)
    {	
    ?>
    <script>
        setTimeout(function() 
        {
            swal({
                title: "Successfully",
                text: "Completed!",
                type: "success"
                }, function() {
                window.location = "user_master.php";
            });
        }, 100);
    </script>  
    <?php
    }	
    else
    {
    ?>
    <script>
        setTimeout(function() {
            swal({
                title: "Not",
                text: "Completed!",
                type: "error"
                }, function() {
                window.location = "user_master.php";
            });
        }, 100);
    </script> 	  
    <?Php
    }	
    ?>
<script src="../js/sweet-alert.js"></script>