PHP
Isset function on echoing out alerts
Login To Post Your Comment
2 comments
if(isset($_POST["submit"])){ alertWindow('Form Submitted Successfully! We will reply to you within 3-5 working days.');
echo "";
// if user click submit, it will clear cookies and redirect them to index.php
}
?>
Can i check if the above is acceptable?
Not too sure how can i apply the alertRedirect() with the isset function.
Not too sure how can i apply the alertRedirect() with the isset function.
Manfred Lim
4 years agoHi Colleen, because you executed a header("location: ...") right after the alertWindow. So what it does is that it redirects the user away from the page right after your print the alert. So the user won't see the alert and will be redirect.
You can try using the alertRedirect() function instead. That uses JavaScript to show the alert and redirect the user away after that.
Hi all,