Hi,
I have been trying to get this form to work and am unable to get it right due to the fact that I mainly work in html....
Here is the PHP in the top of the page:
<?php
import_request_variables("gP", "_");
/** require_once("sendmail.php"); */
if ($_Submit == "Submit") {
$msgTmp .= "Name : $_name\r\n";
$msgTmp .= "Address 1 : $_address1\r\n";
$msgTmp .= "Address 2 : $_address2\r\n";
$msgTmp .= "County : $_county\r\n";
$msgTmp .= "Postcode : $_textfield\r\n";
$msgTmp .= "Email : $_textfield2\r\n";
$msgTmp .= "Phone : $_textfield3\r\n";
$msgTmp .= "What is your enquiry ? : $_textarea\r\n\r\n";
if ($_marketing_consultancy == 1) {
$msgOtherTmp .= "";
}
if ($_designgraphics == 1) {
$msgOtherTmp .= "";
}
if ($_companyliterature == 1) {
$msgOtherTmp .= "";
}
if ($_webmultimedia == 1) {
$msgOtherTmp .= "";
}
if ($_exhibition == 1) {
$msgOtherTmp .= "";
}
if ($_other == 1) {
$msgOtherTmp .= "Other type of enquiry\r\n";
}
else {
$msgOtherTmp = "\r\n" . $msgOtherTmp;
}
$message = $msgTmp . $msgOtherTmp;
if ((isset($message)) && ($message != "")) {
// smtpmail("stones.wood@zen.co.uk", "stones.wood@zen.co.uk", "Website Enquiry", $message, "From: $_name<"."$_emailaddress".">\r\n"."Reply-To: $_emailaddress\r\n"."Return-Path: $_emailaddress\r\n"."X-Mailer: PHP/".phpversion());
mail ("stones.wood@zen.co.uk", "Website Enquiry", $message, "From: $_name<"."$_emailaddress".">\r\n"."Reply-To: $_emailaddress\r\n"."Return-Path: $_emailaddress\r\n"."X-Mailer: PHP/".phpversion());
$msg = "Your details have been emailed to:stones.wood@zen.co.uk<br /><pre>$message</pre>";
/* Change this to where you want the script to go once it has emailed the details */
header("Location:http://www.stoneswoodretirement.co.uk/thanks.html");
} else {
/* If you get here, something bad has happened ?? */
$msg = "<b>Error!!</b><br />\n";
$msg .= "<br />State \"Error Response Form\" in subject/topic<br />\n";
}
}
?>
And here is the html form:
<table width="420" border="1" bordercolor="#FFFFFF" align="center" cellpadding="0" cellspacing="0" bgcolor="e4e1e1">
<tr><form>
<td width="420" valign="top">
<table width="365" border="0" align="center" cellpadding="6" cellspacing="0">
<tr>
<td width="76"><div align="right" class="bodytext">Name</div></td>
<td width="2"> </td>
<td width="251"><div align="left">
<input name="name" type="text" id="name" size="30" maxlength="100">
</div></td>
</tr>
<tr>
<td><div align="right" class="bodytext">Address 1</div></td>
<td> </td>
<td><div align="left">
<input name="address1" type="text" id="address1" size="30" maxlength="100">
</div></td>
</tr>
<tr>
<td><div align="right" class="bodytext">Address 2</div></td>
<td> </td>
<td><div align="left">
<input name="address2" type="text" id="address2" size="30" maxlength="100">
</div></td>
</tr>
<tr>
<td><div align="right" class="bodytext">County</div></td>
<td> </td>
<td><div align="left">
<input name="county" type="text" id="county" size="20" maxlength="30">
</div></td>
</tr>
<tr>
<td><div align="right" class="bodytext">Postcode</div></td>
<td> </td>
<td><div align="left">
<input name="textfield" type="text" size="10" maxlength="10">
</div></td>
</tr>
<tr>
<td><div align="right" class="bodytext">Email</div></td>
<td> </td>
<td><div align="left">
<input name="textfield2" type="text" size="30" maxlength="100">
</div></td>
</tr>
<tr>
<td><div align="right" class="bodytext">Phone</div></td>
<td> </td>
<td><div align="left">
<input name="textfield3" type="text" size="30" maxlength="100">
</div></td>
</tr>
<tr>
<td colspan="3"></td>
</tr>
<tr>
<td colspan="3"><div align="center" class="bodytext">What
is your enquiry?</div></td>
</tr>
<tr>
<td colspan="3"><div align="center">
<textarea name="textarea" cols="30" rows="6"></textarea>
</div></td>
</tr>
</table>
<div align="center">
<input type="submit" name="Submit" value="Submit"onClick="MM_popupMsg('Thank you for your submission.')" >
It did used to work before PHP was updated but now it has an error everytime the page opens.
I would be eternally grateful if someone knows how to make it work again.
many thanks guys.




