<?php include 'session.php'; ?>
<?php 
    $msg = $wrn = $err = "";
?>
<?php 
  if ($msg != "") {
?>
 <script type="text/javascript">
    $(document).ready(function() {
        swal({
            title: "Success",
            text: "<?php echo $msg ?>",
            icon: "success",
            button: "Ok",
            timer: 7000
        });    
    });
</script>
<?php } ?>
<?php 
  if ($err != "") {
?>
 <script type="text/javascript">
    $(document).ready(function() {
        swal({
            title: "Error",
            text: "<?php echo $err ?>",
            icon: "error",
            button: "Ok",
            timer: 5000
        });
    });
</script>
<?php } ?>
<?php 
  if ($wrn != "") {
?>
 <script type="text/javascript">
    $(document).ready(function() {
        swal({
            title: "Warning",
            text: "<?php echo $wrn ?>",
            icon: "warning",
            button: "Ok",
            timer: 5000
        });
    });
</script>
<?php } ?>
<?php 
  if (isset($_GET['success']) ) {
?>
 <script type="text/javascript">
    $(document).ready(function() {
        swal({
            title: "Success",
            text: "You have registered, Login to access your dashboard",
            icon: "success",
            button: "Ok",
            timer: 5000
        });    
       });
</script>
<?php } ?>