My PHP code is redirecting to the provided page without showing the alert box even though I have provided it in the code. Here is the code :
echo "<script type='text/javascript'>alert('Registered Successfully.')</script>";
header("Location:/magz/index - Copy.php");