I copied a template and changed as necessary for my form.
php is working on the site/domain, I've managed to get a simpler version to run properly.
The names have been changed to protect the innocent.
Any help would be greatly appreciated.
<?php
if(isset($_POST['submit'])){
$to = "
[email protected]"; // this is my Email address
$from = $_POST['email']; // this is the sender's Email address
$name = $_POST['name'];
$email = $_POST['email'];
$address = $_POST['address'];
$city = $_POST['city'];
$state_province = $_POST['state_province'];
$country = $_POST['country'];
$zippost = $_POST['zippost'];
$tel = $_POST['tel'];
$Product_1__Qty = $_POST['Product_1__Qty'];
$Product_2__Qty = $_POST['Product_2__Qty'];
$Product_3__Qty = $_POST['Product_3__Qty'];
$Product_4__Qty = $_POST['Product_4__Qty'];
$subject = "Product Oder";
$subject2 = "Copy of your Product Oder";
$message = $name . " " . $company . " Ordered the following:" . "\n\n" . $_POST['message'];
$message2 = "Here is a copy of your message " . $name . "\n\n" . $_POST['message'];
$headers = "From:" . $from;
$headers2 = "From:" . $to;
mail($to,$subject,$message,$headers,$name,$company,$tel,$address,$city,$state_province,$country,$zippost, $Product_1__Qty,$Product_2__Qty, $Product_3__Qty,$Product_4__Qty); //emails form data
//mail($from,$subject2,$message2,$headers2, $name,$company,$tel,$address,$city,$state_province,$country,$zippost, $Product_1__Qty,$Product_2__Qty, $Product_3__Qty,$Product_4__Qty); // sends a copy of form data to the sender
{
header("Location:http://www.mydomain.com");// Redirect
}
}
?>
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Untitled Document</title>
<style type="text/css">
body,td,th {
font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "DejaVu Sans", Verdana, sans-serif;
font-size: 12px;
color: #1A6F84;
}
body {
Form continues hereā¦.