If you check out http://www.lacrosse-lounge.com/Contact%20us.html youll notice when ever you send an email it goes straight to a blank page with the address http://www.lacrosse-lounge.com/MAILER.php
but i thought i had set up my php and page to redirect after clicking submit to this page http://www.lacrosse-lounge.com/Thankyou.html
if any one knows a solution I would be really greatful i want it so once i click submit itll bring you to http://www.lacrosse-lounge.com/Thankyou.html and send the email to
| sshipelax@lacrosse-lounge.com |
the php code is
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<?php
$to = "sshipelax@lacrosse-lounge.com";
$subject = "Support requested by ".$_POST['name'];
$name_field = $_POST['name'];
$email_field = $_POST['email'];
$message = $_POST['message'];
$headers = 'From: '.$_POST['email'].'' . "\r\n" .
'Reply-To: '.$_POST['email'].'' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
$body = $message;
mail($to, $subject, $body, $headers );
header( 'Location:http://www.lacrosse-lounge.com/Thankyou.html' ) ; //replace with landing page.
?>
<body>
</body>
</html>
and the contact code is
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Contact Us</title>
<meta name="description" content="Our store offers local lacrosse players a place to buy equipment from knowledgeable players who own the store. " />
<meta name="keywords" content="Lacrosse-Lounge, lacrosse lounge, Delaware, Delaware lacrosse" />
<meta name="author" content="Steve Shipe" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
.Txt {
color: #FFF;
}
.txt {
color: #FFF;
}
.txt {
color: #FFF;
}
body p {
color: #FFF;
text-align: left;
font-size: 24px;
}
.style22 {color: #FFEF3A}
.style13 { color: #89451f;
font-size: 10px;
}
.style14 {
font-size: 20px;
color: #000;
}
#”Name” {
font-family: Arial, Helvetica, sans-serif;
font-size: 15px;
font-weight: bold;
color: #2f231e;
float: right;
padding-top: 0px;
padding-right: 30px;
}
.style141 {
font-size: 20px;
color: #2f231e;
}
body {
background-color: #CCC;
color: #FFF;
}
.con {
color: #FFF;
}
</style>
</head>
<body><tr>
<td height="358" valign="top" bgcolor="#FFFFFF"><div align="center" class="style1">
<table width="1280" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="1287" height="650" valign="top" bgcolor="#000000"><table width="1280" border="0">
<tr>
<td width="1277"><img src="images/design2-slice_01-(2).jpg" alt="LACROSSE-LOUNGE" width="1280" height="296" border="0" usemap="#Map" /></td>
</tr>
</table>
<p>Question,Comment,Concern,or Custom Order?<br />
Drop us a line.
</p>
<form method="POST" action="MAILER.php">
Name<br />
<input type="text" name="name" size="30" value="" class="text-input" />
<br />
Email<br />
<input type="text" name="email" id="email" size="30" value="" class="text-input" />
<br />
<span class="con">Your Messag</span>e<br />
<textarea cols="25" rows="8" name="message" class="text-input"></textarea>
<br />
<input type="submit" value="Send Email" name="submit" class="button" id="submit_btn" />
</form>
<td height="358" bgcolor="#FFFFFF"></p></td>
</tr>
</table>
<table width="1286" height="21" cellpadding="0" cellspacing="0">
<tr>
<td height="19" align="center" valign="top" bgcolor="#000000"><span class="style22">Content copyright 2012. LACROSSE-LOUNGE.COM. All rights reserved. </span></td>
</tr>
</table>
<div id=”Name”>
<p><span class="style14">Steve Shipe</span><br />
<span class="style13">Lacrosse-Lounge.com</span></p>
</div>
<map name="Map" id="Map">
<area shape="rect" coords="4,246,117,299" href="index.html" />
<area shape="rect" coords="199,245,363,311" href="About_Us.html" />
<area shape="rect" coords="396,245,703,299" href="Custom Stringing.html" />
<area shape="rect" coords="737,249,1038,293" href="Custom Apparel.html" />
<area shape="rect" coords="1055,247,1265,299" href="Contact us.html" />
</map>
</body>
</html>
PLEASE HELP A HIGHSCHOOL STUDENT OUT ITLL BE MUCH APPRECIATED!!
If your talking about this snippet: <form method="POST" action="MAILER.php">
i tried making the action="http://www.lacrosse-lounge.com/Thankyou.html">
and it would bring you to the thank you page but it wouldnt send any email. having mailer.php there sends the email but wont take me to http://www.lacrosse-lounge.com/Thankyou.html. Thank you for the quick help this is your second time helping me and your a huge help you dont understand how greatful i am for people like you.
Have a look how this guy has gone about doing same http://www.linecraft.com/spry_data_utils/videos/sending_spry_email.php
Gramps
I dont see where the code is that will bring you to a thank you page or redirect you to a page you want it to bring yo to after clicking submit. its weird cause the same code that i used for the lacrosse site worked well as the contact form for www.contentsofadeadmanspockets.com. Once again i'm so happy for the help
The following will be shown if and when the e-mail has been successfully sent
if(mail($to, stripslashes($subject), stripslashes($message),$headers)){
echo "The message has been sent";
die();
}else{
echo "Error sending message";
die();
}
The highlighted part could contain the 'Thank You' message instead.
You could also rephrase the whole as
if(mail($to, stripslashes($subject), stripslashes($message),$headers)){
header("Location:/thankyou.html");
die();
}else{
header("Location:/error.html");
die();
}
Gramps
North America
Europe, Middle East and Africa
Asia Pacific