Hi Shirley
I looked at this form and here's a simple php page that should work.
First the form needs to be directed to the php file with the full address of your site (I called it mailsent.php)
Code:
<form id="form" class="blocks" action="http://YOUR WEBSITE ADDRESS/mailsent.php" method="post">
Now the code for the page "mailsent.php" is below:
Code:
<!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>
<body>
<h1>Email Result</h1>
<?php // get form data
$email=$_POST['email'];
$name=$_POST['name'] . "-" . $_POST['company'] . "-" . $_POST['phone'];
$subject="YOUR SITE NAME - WEBSITE ENQUIRY"; // enter your website domain name here
$message="SENDER:- " . $name . " MESSAGE:- " . $_POST['Comments'];
$to = "ENTER YOUR EMAIL ADDRESS HERE"; // this is where your email address goes
$headers = "From: $email";
$sent = mail($to, $subject, $message, $headers) ; // sending email
if($sent) //successfully sent
{
?>
<table width="500" border="0" align="center" cellpadding="1" cellspacing="0">
<tr>
<td align="left" valign="top" bgcolor="#ccc"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" bgcolor="#ccc"> <p> </p>
<p>Thankyou. Your Email Has Been Sent</p>
<p>Please <a href="ENTER REFERRAL PAGE HERE">click
here </a> to continue</p>
<p> </p></td>
</tr>
</table></td>
</tr>
</table>
<? } //end if
else // unsuccessfully sent
{
?>
<p> </p><table width="500" border="0" align="center" cellpadding="1" cellspacing="0">
<tr>
<td align="left" valign="top" bgcolor="#ccc"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" bgcolor="#ccc"> <p> </p>
<p>Sorry , An Error Was Encountered </p>
<p>Please <a href="ENTER REFERRAL PAGE HERE">click
here</a> to continue</p>
<p> </p></td>
</tr>
</table></td>
</tr>
</table>
<? } //end else
?>
</body>
</html>
I hope this helps.
Bookmarks