First I have to show alert box then I have to transfer to another.But in my case it is not showing alert box and it is going to another page.
echo "<script>alert('Your Record Sucessfully Inserted.Now Login');</script>";
header('location:login.php');