alexshields
09-18-2007, 03:10 PM
I have this contact us page, located at: http://www.behaviorconsultingservices.com/contactus.htm
I love the page, but have so far been unable to direct the emails to the address I want them sent to when someone presses submit. What am I missing in the code pasted below?
Thank you!!!
<HTML>
<HEAD>
<TITLE>Thank you</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<!-- ImageReady Preload Script (index.psd) -->
<!-- End Preload Script -->
</HEAD>
<link href="css/styles.css" rel="stylesheet" type="text/css">
<center>
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<!-- ImageReady Slices (index.psd) -->
<table width="775" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="3" rowspan="2" background="images/nright2.gif"><img src="images/title.gif" width="568" height="88"></td>
<td width="166"><img src="images/main4.gif" width="166" height="69"></td>
<td width="41" rowspan="2"><img src="images/nmain5.gif" width="41" height="88"></td>
</tr>
<tr>
<td><a href="contactus.htm"><img src="images/contactus.gif" width="166" height="19" border="0"></a></td>
</tr>
<tr>
<td width="121" rowspan="3" bgcolor="#2F2F2F"> </td>
<td width="85" valign="top" bgcolor="#2F2F2F"><img src="images/main2.gif" width="85" height="23"><a href="index.htm"><img src="images/buttonhome.gif" width="85" height="21" border="0"></a><a href="aba.html"><img src="images/buttonaba.gif" width="85" height="21" border="0"></a><a href="homebased.html"><img src="images/buttonhomebased.gif" width="85" height="21" border="0"></a><a href="school.html"><img src="images/buttonsch.gif" width="85" height="21" border="0"></a><a href="clinic.html"><img src="images/buttonclinic.gif" width="85" height="21" border="0"></a><a href="about.html"><img src="images/buttonaboutgreen.gif" width="85" height="21" border="0"></a><a href="faq.html"><img src="images/buttonfaq.gif" width="85" height="21" border="0"></a><a href="links.html"><img src="images/buttonlinks.gif" width="85" height="21" border="0"></a></td>
<td colspan="2" rowspan="3" align="center" valign="top"><p>Thank you for your email. We will contact you shortly. </p>
<table width="500" border="0" cellspacing="0" cellpadding="10">
<tr>
<td colspan="2"><h2 align="center"><?php
// Website Contact Form Generator
// http://www.tele-pro.co.uk/scripts/contact_form/
// This script is free to use as long as you
// retain the credit link
// get posted data into local variables
$EmailFrom = Trim(stripslashes($_POST['EmailFrom']));
$EmailTo = "rhonda@behavorconsultingservices.com";
$Subject = "user filled in contact form.";
$FirstName = Trim(stripslashes($_POST['FirstName']));
$LastName = Trim(stripslashes($_POST['LastName']));
$Tel = Trim(stripslashes($_POST['Tel']));
$Message = Trim(stripslashes($_POST['Message']));
// validation
$validationOK=true;
if (Trim($EmailFrom)=="") $validationOK=false;
if (!$validationOK) {
print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
exit;
}
// prepare email body text
$Body = "";
$Body .= "FirstName: ";
$Body .= $FirstName;
$Body .= "\n";
$Body .= "LastName: ";
$Body .= $LastName;
$Body .= "\n";
$Body .= "Tel: ";
$Body .= $Tel;
$Body .= "\n";
$Body .= "Message: ";
$Body .= $Message;
$Body .= "\n";
// send email
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
// redirect to success page
if ($success){
print "<meta http-equiv=\"refresh\" content=\"0;URL=ok.htm\">";
}
else{
print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
}
?>
</h2>
</td>
</tr>
</table></td>
<td rowspan="2" valign="top" nowrap background="images/nright.gif"><img src="images/nmain6.gif" width="41" height="180" align="top"></td>
</tr>
<tr>
<td valign="bottom" bgcolor="#2E2E2E"> </td>
</tr>
<tr>
<td valign="bottom" bgcolor="#2E2E2E"><img src="images/thisisme.gif" width="85" height="275"></td>
<td valign="bottom" background="images/nright.gif"><img src="images/shadowright.gif" width="41" height="145"></td>
</tr>
<tr>
<td bgcolor="#2F2F2F"> </td>
<td valign="bottom" bgcolor="#2E2E2E"> </td>
<td colspan="2" align="right"><img src="images/down.gif" width="537" height="16"></td>
<td valign="bottom"><img src="images/brcorner.gif" width="41" height="16"></td>
</tr>
<tr>
<td bgcolor="#2F2F2F"> </td>
<td valign="bottom" bgcolor="#2E2E2E"> </td>
<td colspan="2" align="right" valign="top" background="images/b_links.gif"><a href="index.htm">Home</a> | <a href="aba.html">ABA</a> | <a href="homebased.html">Home Based</a> | <a href="school.html">School Based</a> | <a href="clinic.html">Clinic Based</a> | <a href="about.html">About Us</a> | <a href="contactus.htm">Contact Us</a></td>
<td rowspan="2" valign="bottom" background="images/nright2.gif"> </td>
</tr>
<tr>
<td bgcolor="#2F2F2F"> </td>
<td valign="bottom" bgcolor="#2E2E2E"> </td>
<td colspan="2" align="right" valign="top" background="images/b_links.gif"> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td width="371"> </td>
<td> </td>
<td> </td>
</tr>
</table>
<!-- End ImageReady Slices -->
</BODY>
</center>
</HTML>
I love the page, but have so far been unable to direct the emails to the address I want them sent to when someone presses submit. What am I missing in the code pasted below?
Thank you!!!
<HTML>
<HEAD>
<TITLE>Thank you</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<!-- ImageReady Preload Script (index.psd) -->
<!-- End Preload Script -->
</HEAD>
<link href="css/styles.css" rel="stylesheet" type="text/css">
<center>
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<!-- ImageReady Slices (index.psd) -->
<table width="775" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="3" rowspan="2" background="images/nright2.gif"><img src="images/title.gif" width="568" height="88"></td>
<td width="166"><img src="images/main4.gif" width="166" height="69"></td>
<td width="41" rowspan="2"><img src="images/nmain5.gif" width="41" height="88"></td>
</tr>
<tr>
<td><a href="contactus.htm"><img src="images/contactus.gif" width="166" height="19" border="0"></a></td>
</tr>
<tr>
<td width="121" rowspan="3" bgcolor="#2F2F2F"> </td>
<td width="85" valign="top" bgcolor="#2F2F2F"><img src="images/main2.gif" width="85" height="23"><a href="index.htm"><img src="images/buttonhome.gif" width="85" height="21" border="0"></a><a href="aba.html"><img src="images/buttonaba.gif" width="85" height="21" border="0"></a><a href="homebased.html"><img src="images/buttonhomebased.gif" width="85" height="21" border="0"></a><a href="school.html"><img src="images/buttonsch.gif" width="85" height="21" border="0"></a><a href="clinic.html"><img src="images/buttonclinic.gif" width="85" height="21" border="0"></a><a href="about.html"><img src="images/buttonaboutgreen.gif" width="85" height="21" border="0"></a><a href="faq.html"><img src="images/buttonfaq.gif" width="85" height="21" border="0"></a><a href="links.html"><img src="images/buttonlinks.gif" width="85" height="21" border="0"></a></td>
<td colspan="2" rowspan="3" align="center" valign="top"><p>Thank you for your email. We will contact you shortly. </p>
<table width="500" border="0" cellspacing="0" cellpadding="10">
<tr>
<td colspan="2"><h2 align="center"><?php
// Website Contact Form Generator
// http://www.tele-pro.co.uk/scripts/contact_form/
// This script is free to use as long as you
// retain the credit link
// get posted data into local variables
$EmailFrom = Trim(stripslashes($_POST['EmailFrom']));
$EmailTo = "rhonda@behavorconsultingservices.com";
$Subject = "user filled in contact form.";
$FirstName = Trim(stripslashes($_POST['FirstName']));
$LastName = Trim(stripslashes($_POST['LastName']));
$Tel = Trim(stripslashes($_POST['Tel']));
$Message = Trim(stripslashes($_POST['Message']));
// validation
$validationOK=true;
if (Trim($EmailFrom)=="") $validationOK=false;
if (!$validationOK) {
print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
exit;
}
// prepare email body text
$Body = "";
$Body .= "FirstName: ";
$Body .= $FirstName;
$Body .= "\n";
$Body .= "LastName: ";
$Body .= $LastName;
$Body .= "\n";
$Body .= "Tel: ";
$Body .= $Tel;
$Body .= "\n";
$Body .= "Message: ";
$Body .= $Message;
$Body .= "\n";
// send email
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
// redirect to success page
if ($success){
print "<meta http-equiv=\"refresh\" content=\"0;URL=ok.htm\">";
}
else{
print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
}
?>
</h2>
</td>
</tr>
</table></td>
<td rowspan="2" valign="top" nowrap background="images/nright.gif"><img src="images/nmain6.gif" width="41" height="180" align="top"></td>
</tr>
<tr>
<td valign="bottom" bgcolor="#2E2E2E"> </td>
</tr>
<tr>
<td valign="bottom" bgcolor="#2E2E2E"><img src="images/thisisme.gif" width="85" height="275"></td>
<td valign="bottom" background="images/nright.gif"><img src="images/shadowright.gif" width="41" height="145"></td>
</tr>
<tr>
<td bgcolor="#2F2F2F"> </td>
<td valign="bottom" bgcolor="#2E2E2E"> </td>
<td colspan="2" align="right"><img src="images/down.gif" width="537" height="16"></td>
<td valign="bottom"><img src="images/brcorner.gif" width="41" height="16"></td>
</tr>
<tr>
<td bgcolor="#2F2F2F"> </td>
<td valign="bottom" bgcolor="#2E2E2E"> </td>
<td colspan="2" align="right" valign="top" background="images/b_links.gif"><a href="index.htm">Home</a> | <a href="aba.html">ABA</a> | <a href="homebased.html">Home Based</a> | <a href="school.html">School Based</a> | <a href="clinic.html">Clinic Based</a> | <a href="about.html">About Us</a> | <a href="contactus.htm">Contact Us</a></td>
<td rowspan="2" valign="bottom" background="images/nright2.gif"> </td>
</tr>
<tr>
<td bgcolor="#2F2F2F"> </td>
<td valign="bottom" bgcolor="#2E2E2E"> </td>
<td colspan="2" align="right" valign="top" background="images/b_links.gif"> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td width="371"> </td>
<td> </td>
<td> </td>
</tr>
</table>
<!-- End ImageReady Slices -->
</BODY>
</center>
</HTML>