PHP Contact form file

the mail() function

Moderators: egami, macek, gesf

Post Reply
kyle04
New php-forum User
New php-forum User
Posts: 94
Joined: Sat Jul 07, 2012 1:36 pm

Wed Jul 18, 2012 4:07 pm

Javascript is probably you best bet :

Code: Select all

if(@mail($your_email,$email_subject,$email_content)) {

echo "Thanks for contacting us we will reply you withing in 5 business days" ;

echo "script type=\"text/javascript\">";

echo "setTimeout(function(){window.location=\"http://bannistermarketinggroup.co.uk/site_optimization/\"},2000);";
echo "</script>";
}
The timeout figure 2000 can be altered (1000 = 1 second);
** add < before script type=, it keeps disappearing for some reason...
AndyP

kyle04
New php-forum User
New php-forum User
Posts: 94
Joined: Sat Jul 07, 2012 1:36 pm

Thu Jul 26, 2012 2:39 pm

if(@mail($your_email,$email_subject,$email_content)) {

$thank_you = "Thanks for contacting us we will reply you withing in 5 business days" ;
$subject = "bannistermarketinggroup form submission"; // or whatever

if(@mail($email,$subject,$thank_you)) { // $email is the clients mail , send the thank you message

echo "$thank_you;

echo "<script type=\"text/javascript\">";

echo "setTimeout(function(){window.location=\"http://bannistermarketinggroup.co.uk/si ... n/\"},2000);";
echo "</script>";
}
}

Post Reply