I have this code snippet:
echo "<script language='javascript'>alert('FreeExam database backed up successfully');</script>";
header('Location: Admin.php');
exit();
When I take the first line out, it works fine, but when running this, it gives me the following error: 'Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\FreeExam\Selector.php:209) in C:\xampp\htdocs\FreeExam\Selector.php on line 210' . I need to display a message to the user before redirecting to the Admin.php page.
Any help would be greatly appreciated!!