Saturday, 31 August 2013

Php upon success submittion function

Php upon success submittion function

I am trying to make a functions. Well, I am trying to display popup box
upon successful submit of form and a function to stay on the page or
redirect back to previous page.
here is my code:
if ($success) {
echo "<script type='text/javascript'>alert('submitted
successfully!')</script>";
header("location:javascript://history.go(-1)");
}
?>
With the above code popup is not showing but page stays upon successful
submit but it does't show alert. Please help me to make better code to do
this.
Thanks in advance :)

No comments:

Post a Comment