File size: 998 Bytes
9aba585
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<!doctype html>
<html lang="en">

<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <script src="sweetalert2.min.js"></script>
    <link rel="stylesheet" href="sweetalert2.min.css">
    <title>Login & Signup Form</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
    <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
</head>
<body>
    <script>
      <?php
      if (isset($_SESSION['success'])) {
          echo "swal('Success', '" . $_SESSION['success'] . "', 'success');";
          unset($_SESSION['success']); // Unset the session after displaying the message
      } elseif (isset($_SESSION['error'])) {
          echo "swal('Error', '" . $_SESSION['error'] . "', 'error');";
          unset($_SESSION['error']); // Unset the session after displaying the message
      }
      ?>
  </script>
</body>
</html>