Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include("includes/config.php");
- if (!empty($_POST['submit'])) {
- $query = "INSERT INTO `enquiries` (`id`,`title`,`fname`,`lname`,`company`,`address1`,`address2`,`town`,`county`,`postcode`,`telephone`,`email`,`deladdress1`,`deladdress2`,`deltown`,`delcounty`,`delpostcode`,`skipsize`,`reqday`,`reqmonth`,`reqyear`,`colday`,`colmonth`,`colyear`,`enquiry`,`orderno`)
- VALUES('','".$_POST['title']."','".$_POST['fname']."','".$_POST['lname']."','".$_POST['company']."','".$_POST['address1']."','".$_POST['address2']."','".$_POST['town']."','".$_POST['county']."','".$_POST['postcode']."','".$_POST['telephone']."','".$_POST['email']."','".$_POST['deladdress1']."','".$_POST['deladdress2']."','".$_POST['deltown']."','".$_POST['delcounty']."','".$_POST['delpostcode']."','".$_POST['skipsize']."','".$_POST['reqday']."','".$_POST['reqmonth']."','".$_POST['reqyear']."','".$_POST['colday']."','".$_POST['colmonth']."','".$_POST['colyear']."','".$_POST['enquiry']."','".$_POST['orderno']."')";
- mysql_query($query);
- $to = '';
- $subject = 'Website Change Reqest';
- $headers .= "From: \r\n";
- $headers .= "Reply-To: ". strip_tags($_POST['email']) . "\r\n";
- $headers .= "MIME-Version: 1.0\r\n";
- $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
- $message .= "<html><body><table border='0'><tr>";
- $message .= "<td><strong>Title: </strong>" . strip_tags($_POST['title']) . "</td></tr>";
- $message .= "<tr><td><strong>First Name: </strong>" . strip_tags($_POST['fname']) . "</td></tr>";
- $message .= "<tr><td><strong>Last Name: </strong>" . strip_tags($_POST['lname']) . "</td></tr>";
- $message .= "<tr><td><strong>Company: </strong>" . strip_tags($_POST['company']) . "</td></tr>";
- $message .= "<tr><td><strong>Address 1: </strong>" . strip_tags($_POST['address1']) . "</td></tr>";
- $message .= "<tr><td><strong>Address 2: </strong>" . strip_tags($_POST['address2']) . "</td></tr>";
- $message .= "<tr><td><strong>Town: </strong>" . strip_tags($_POST['town']) . "</td></tr>";
- $message .= "<tr><td><strong>County: </strong>" . strip_tags($_POST['county']) . "</td></tr>";
- $message .= "<tr><td><strong>Postcode: </strong>" . strip_tags($_POST['postcode']) . "</td></tr>";
- $message .= "<tr><td><strong>Telephone Number: </strong>" . strip_tags($_POST['telephone']) . "</td></tr>";
- $message .= "<tr><td><strong>Email Address: </strong>" . strip_tags($_POST['email']) . "</td></tr>";
- $message .= "<tr><td><strong>Site Address 1: </strong>" . strip_tags($_POST['deladdress1']) . "</td></tr>";
- $message .= "<tr><td><strong>Site Address 2: </strong>" . strip_tags($_POST['deladdress2']) . "</td></tr>";
- $message .= "<tr><td><strong>Site Town: </strong>" . strip_tags($_POST['deltown']) . "</td></tr>";
- $message .= "<tr><td><strong>Site County: </strong>" . strip_tags($_POST['delcounty']) . "</td></tr>";
- $message .= "<tr><td><strong>Site Postcode: </strong>" . strip_tags($_POST['delpostcode']) . "</td></tr>";
- $message .= "<tr><td><strong>Skip Size: </strong>" . strip_tags($_POST['skipsize']) . "</td></tr>";
- $message .= "<tr><td><strong>Required Date: </strong>" . strip_tags($_POST['reqday']) . "/" . strip_tags($_POST['reqmonth']) . "/" . strip_tags($_POST['reqyear']) . "</td></tr>";
- $message .= "<tr><td><strong>Collection Date: </strong>" . strip_tags($_POST['colday']) . "/" . strip_tags($_POST['colmonth']) . "/" . strip_tags($_POST['colyear']) . "</td></tr>";
- $message .= "<tr><td><strong>Enquiry Form: </strong>" . strip_tags($_POST['enquiry']) . "</td></tr>";
- $message .= "<tr><td><strong>Order Number: </strong>" . strip_tags($_POST['orderno']) . "</td>";
- $message .= "</tr></table></body></html>";
- mail($to, $subject, $message, $headers);
- header("Location: /thankyou.html");
- }
- ?>
Add Comment
Please, Sign In to add comment