Javascript alert instead of redirect in PHP mail script
Posted
by JCHASE11
on Stack Overflow
See other posts from Stack Overflow
or by JCHASE11
Published on 2010-04-10T17:13:02Z
Indexed on
2010/04/10
17:23 UTC
Read the original article
Hit count: 245
Thanks to Col. Shrapnel I am using a VERY basic PHP script to send emails. The form is located here.
This is the script:
<?php
mail('[email protected]','Live Date Submission',implode("\n\n",$_POST));
header("Location: thankyou.html");
?>
When a user submits the form, they are redirected to a thankyou.html page. I want to edit the code to display a javascript alert, instead of a redirect. I don't have much PHP knowledge, so how would I edit this code to return a alert instead of a redirect?
© Stack Overflow or respective owner