Guest User

Untitled

a guest
Jun 21st, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.65 KB | None | 0 0
  1. <?php include("includes/config.php"); ?>
  2.  
  3. <?php
  4.  
  5.  
  6. if (!empty($_POST['submit'])) {
  7. $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`)
  8. 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']."')";
  9.  
  10. mysql_query($query);
  11.  
  12. $to = '';
  13.  
  14. $subject = 'Website Change Reqest';
  15.  
  16. $headers .= "From: \r\n";
  17. $headers .= "Reply-To: ". strip_tags($_POST['email']) . "\r\n";
  18. $headers .= "MIME-Version: 1.0\r\n";
  19. $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
  20. $message .= "<html><body><table border='0'><tr>";
  21. $message .= "<td><strong>Title: </strong>" . strip_tags($_POST['title']) . "</td></tr>";
  22. $message .= "<tr><td><strong>First Name: </strong>" . strip_tags($_POST['fname']) . "</td></tr>";
  23. $message .= "<tr><td><strong>Last Name: </strong>" . strip_tags($_POST['lname']) . "</td></tr>";
  24. $message .= "<tr><td><strong>Company: </strong>" . strip_tags($_POST['company']) . "</td></tr>";
  25. $message .= "<tr><td><strong>Address 1: </strong>" . strip_tags($_POST['address1']) . "</td></tr>";
  26. $message .= "<tr><td><strong>Address 2: </strong>" . strip_tags($_POST['address2']) . "</td></tr>";
  27. $message .= "<tr><td><strong>Town: </strong>" . strip_tags($_POST['town']) . "</td></tr>";
  28. $message .= "<tr><td><strong>County: </strong>" . strip_tags($_POST['county']) . "</td></tr>";
  29. $message .= "<tr><td><strong>Postcode: </strong>" . strip_tags($_POST['postcode']) . "</td></tr>";
  30. $message .= "<tr><td><strong>Telephone Number: </strong>" . strip_tags($_POST['telephone']) . "</td></tr>";
  31. $message .= "<tr><td><strong>Email Address: </strong>" . strip_tags($_POST['email']) . "</td></tr>";
  32. $message .= "<tr><td><strong>Site Address 1: </strong>" . strip_tags($_POST['deladdress1']) . "</td></tr>";
  33. $message .= "<tr><td><strong>Site Address 2: </strong>" . strip_tags($_POST['deladdress2']) . "</td></tr>";
  34. $message .= "<tr><td><strong>Site Town: </strong>" . strip_tags($_POST['deltown']) . "</td></tr>";
  35. $message .= "<tr><td><strong>Site County: </strong>" . strip_tags($_POST['delcounty']) . "</td></tr>";
  36. $message .= "<tr><td><strong>Site Postcode: </strong>" . strip_tags($_POST['delpostcode']) . "</td></tr>";
  37. $message .= "<tr><td><strong>Skip Size: </strong>" . strip_tags($_POST['skipsize']) . "</td></tr>";
  38. $message .= "<tr><td><strong>Required Date: </strong>" . strip_tags($_POST['reqday']) . "/" . strip_tags($_POST['reqmonth']) . "/" . strip_tags($_POST['reqyear']) . "</td></tr>";
  39. $message .= "<tr><td><strong>Collection Date: </strong>" . strip_tags($_POST['colday']) . "/" . strip_tags($_POST['colmonth']) . "/" . strip_tags($_POST['colyear']) . "</td></tr>";
  40. $message .= "<tr><td><strong>Enquiry Form: </strong>" . strip_tags($_POST['enquiry']) . "</td></tr>";
  41. $message .= "<tr><td><strong>Order Number: </strong>" . strip_tags($_POST['orderno']) . "</td>";
  42. $message .= "</tr></table></body></html>";
  43.  
  44. mail($to, $subject, $message, $headers);
  45.  
  46.  
  47. }
  48.  
  49.  
  50.  
  51. ?>
Add Comment
Please, Sign In to add comment