I'm having some troubles getting a php redirect to execute after a javascript alert is called. The code is below:
echo '<script>window.alert("This device is aleady registered to another user");</script>';
header('Location: page.php');
After clicking "OK" on the alert, the redirect does not execute. Any thoughts as to how I can get this code working?
Thanks