Hi Craig,
The best way to do it would be to redirect the user to another page if the mail has been sent
- PHP: Select all
// if the mail was sent successfully
if(mail($to, $subject, $body))
{
// redirect the user to another page
header('Location: http://www.example.com/'); exit;
}
else
{
// otherwise, tell them something went wrong
echo 'Oops!';
}
You must not output any
html before the header() function, so no using echo/print or any whitespace before your opening
php tags!
Give that a shot
