-2

Also i tried creating customize alert box using html,css and javascript, but my problem is how can I call it in the echo function of PHP?

if (($con -> query($query) === TRUE) &&
($con -> query($query1) === TRUE) &&
($con -> query($query2) === TRUE) &&
($con -> query($query3) === TRUE))
{
   echo "<script>alert('Employee Successfully Added')</script>";
}

like if the queries are correct, the customized alert box will pop up.

Swiffy
  • 4,401
  • 2
  • 23
  • 49
  • https://stackoverflow.com/questions/7853130/how-to-change-the-style-of-alert-box – Emil Karlsson Nov 18 '21 at 08:26
  • 2
    Does this answer your question? [How to change the style of alert box?](https://stackoverflow.com/questions/7853130/how-to-change-the-style-of-alert-box) – Swiffy Nov 18 '21 at 08:27

1 Answers1

-1

use sweetalert

<script src="//cdn.jsdelivr.net/npm/sweetalert2@11"></script>
Swal.fire({
  position: 'top-end',
  icon: 'success',
  title: 'Your work has been saved',
  showConfirmButton: false,
  timer: 1500
})
Hyperella
  • 60
  • 4