View Single Post
05-26-2008, 02:38 AM
#31
JulesR is offline JulesR
Status: Member
Join date: Apr 2008
Location:
Expertise:
Software:
 
Posts: 129
iTrader: 0 / 0%
 

JulesR is on a distinguished road

  Old

Just build an "if" check around the form, no need to redirect at all.

First you should set a variable or something if the mail has been successfully sent:

PHP Code:
if (mail(...blah)) {
$success yes;

Then around the actual <form> elements in the page you should do something like:

PHP Code:
<?php
if (!isset($success)) {
// Break out of PHP and show the form:
?>
<form.... blah blah>
Insert your form mumbo jumbo.
</form>
<?php
}
else {
echo 
"Thanks for contacting us. Blah blah blah";
}
?>