<?php
if (isset($_SESSION['success'])) {
   ?>
   <script>


swal({
  title: "<?php echo $_SESSION['success'];?>",
  text: "",
  icon: "success",
  button: "ok",
});
  </script>
  <?php
  unset($_SESSION['success']);
}
?>
<?php
if (isset($_SESSION['error'])) {
   ?>
   <script>


swal({
  title: "<?php echo $_SESSION['error'];?>",
  text: "",
  icon: "error",
  button: "ok",
});
  </script>
  <?php
  unset($_SESSION['success']);
}
?>

<script src="assets/sweeatjs.js"></script>