Hi Jen
Works like a charm and generates the html and the php. Still as long as others have sorted you out that's cool and why we are here
<form method="POST" action="contact.php">
Fields marked (*) are required
Salutation:
<input type="text" name="Salutation">
<input type="submit" name="submit" value="Submit">
</form>
Created by <a target="_blank"
href="http://www.tele-pro.co.uk/scripts/contact_form/">Contact
Form Generator</a>
<?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 = "john@this address.com";
$EmailTo = "john@anotheremail address.com";
$Subject = "Hello form the web";
$Salutation = Trim(stripslashes($_POST['Salutation']));
// validation
$validationOK=true;
if (!$validationOK) {
print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
exit;
}
// prepare email body text
$Body = "";
$Body .= "Salutation: ";
$Body .= $Salutation;
$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\">";
}
?>