PHP Script needs stay on current page when submitted, and popup a thank you window or other html page
Posted on 2004-10-02
I am working with the following PHP script:
$to = "firstname.lastname@example.org";
$msg = "$name\n\n";
mail($to, "info email", $msg, "From: My web site\nReply-To: $email\n");
and the following html:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<form name="form1" method="post" action="form.php">
<input type="submit" name="Submit" value="Submit">
this works so far but:
When submitted the form navigates to a page that is the php form, which is blank and useless.
I want to:
1. When submitted clear the form
2. Pop up a new window with a seperate html page in it.
3. Keep the original window open and on the current page.
I basically want to add my form on my hompage and I don't want to make a whole new page for the form. I just want to put it at the bottom of my homepage and people can submit their emails and then keep viewing that page.
I could really use some help on this I have gotten the form to go to a new page with "header (location:..)
navigates away from the original page.
thanks for any help,