.guys I have the following code:
echo (\"\");
Use this if you also want to consider non-javascript users:
echo ("<SCRIPT LANGUAGE='JavaScript'>
window.alert('Succesfully Updated')
window.location.href='http://someplace.com';
</SCRIPT>
<NOSCRIPT>
<a href='http://someplace.com'>Successfully Updated. Click here if you are not redirected.</a>
</NOSCRIPT>");
You could do this:
echo "<script>alert('Successfully Updated'); window.location = './edit.php';</script>";
Alert will block the program flow so you can just write the following.
echo ("<script LANGUAGE='JavaScript'>
window.alert('Succesfully Updated');
window.location.href='http://someplace.com';
</script>");
If you would like to redirect the user after the alert, do this:
echo ("<script LANGUAGE='JavaScript'>
window.alert('Succesfully Updated');
window.location.href='<URL to redirect to>';
</script>");