What is causing the page to redirect after this form is submitted?

I’m trying to make a contact form, based on a script I found elsewhere and edited somewhat. The form works perfectly, it sends an email fine, but the problem is that after it submits, it redirects the user to a blank page that just says “Your message was successfully sent!” I can see where it’s getting that text (I’m not THAT bad at php…) but what I don’t see is how to stop it. I want the form to stay on the same page and just pop up an alert saying it’s been submitted. I tried inserting the html for the original page into the echo() to attempt to spoof it so it at least looks like it’s on the same page, but the entire thing is flagged in dreamweaver as an error when I attempt this. Any help would be greatly appreciated!

$subject="Quote Request from “.$_GET[‘name’];
$headers= “From: “.$_GET[‘email’].”\n”;
$headers.=‘Content-type: text/html; charset=iso-8859-1’;
mail("[email protected]”, $subject, "

Contact letter
".$_GET['details']." " , $headers); echo ("Your message was successfully sent!"); ?> [/php]


" , $headers); echo ("Your message was successfully sent!"); ?>[/php] the echo statement is the one doing it your form has been processed and it will print that.
Sponsor our Newsletter | Privacy Policy | Terms of Service