Some help needed
Posted: Sat Jun 27, 2009 4:48 pm
I have purchased a great template and I have problems to implement the contact form function. The source code is listed below. Any help is much welcomed. Where do I need to make changes? Are there any errors?
Thank you very much!!!
Cindy
<?php
$your_name = $_GET['your_name'];
$your_phone = $_GET['telephone'];
$your_email = $_GET['your_email'];
$your_message = $_GET['message'];
$headers .= 'Content-type: text/html; charset=iso-8859-1';
$content = "<html><head><title>Contact letter</title></head><body><br>";
$content .= "Name: <b>" . $your_name . "</b><br>";
$content .= "Phone: <b>" . $your_phone . "</b><br>";
$content .= "E-mail: <b>" . $your_email . "</b><br><hr><br>";
$content .= $your_message;
$content .= "<br></body></html>";
mail($recipient,$subject,$content,$headers); <br>
$recipient = "info@mywebsite.com";
$subject = "Contact request";
$headers = "From: info@mywebsite.com";
?>
<html>
<body bgcolor="#282E2C">
<div align="center" style="margin-top:60px;color:#FFFFFF;font-size:11px;font-family:Tahoma;font-weight:bold">
Your message was sent. Cindy will contact you shortly. Thank you.
</div>
</body>
</html>
<script>resizeTo(600, 600)</script>
There is another file called 'activescript' as follows:
<%
for i=1 to 7
message=Request("message")
next
message=message + Request("message")
smtpServer = "smtp.1and1.com"
smtpPort = 25
name = Request("Your_Name:")
Set myMail = CreateObject("CDO.Message")
myMail.Subject = "from " & name
myMail.From = Request("Your_Email:")
myMail.To = Request("info@youremail.com")
myMail.HTMLBody = "<html><head><title>Contact letter</title></head><body><br>" & message & "</body></html>"
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/config ... /sendusing") = 2
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/config ... smtpserver") = smtpServer
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/config ... serverport") = smtpPort
myMail.Configuration.Fields.Update
myMail.Send
%>
Thank you very much!!!
Cindy
<?php
$your_name = $_GET['your_name'];
$your_phone = $_GET['telephone'];
$your_email = $_GET['your_email'];
$your_message = $_GET['message'];
$headers .= 'Content-type: text/html; charset=iso-8859-1';
$content = "<html><head><title>Contact letter</title></head><body><br>";
$content .= "Name: <b>" . $your_name . "</b><br>";
$content .= "Phone: <b>" . $your_phone . "</b><br>";
$content .= "E-mail: <b>" . $your_email . "</b><br><hr><br>";
$content .= $your_message;
$content .= "<br></body></html>";
mail($recipient,$subject,$content,$headers); <br>
$recipient = "info@mywebsite.com";
$subject = "Contact request";
$headers = "From: info@mywebsite.com";
?>
<html>
<body bgcolor="#282E2C">
<div align="center" style="margin-top:60px;color:#FFFFFF;font-size:11px;font-family:Tahoma;font-weight:bold">
Your message was sent. Cindy will contact you shortly. Thank you.
</div>
</body>
</html>
<script>resizeTo(600, 600)</script>
There is another file called 'activescript' as follows:
<%
for i=1 to 7
message=Request("message")
next
message=message + Request("message")
smtpServer = "smtp.1and1.com"
smtpPort = 25
name = Request("Your_Name:")
Set myMail = CreateObject("CDO.Message")
myMail.Subject = "from " & name
myMail.From = Request("Your_Email:")
myMail.To = Request("info@youremail.com")
myMail.HTMLBody = "<html><head><title>Contact letter</title></head><body><br>" & message & "</body></html>"
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/config ... /sendusing") = 2
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/config ... smtpserver") = smtpServer
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/config ... serverport") = smtpPort
myMail.Configuration.Fields.Update
myMail.Send
%>