sagive

The form...

Feb 6th, 2015
217
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // HONEYPOT
  2. $fake1          = $_POST['sender_name'];
  3. $fake2          = $_POST['sender_email'];
  4.  
  5. if($fake1 || $fake2) {
  6.     die();
  7. }
  8. else {
  9.     // GRAB VARIABLES
  10.     $name           = htmlspecialchars($_POST['name']);
  11.     $email          = htmlspecialchars($_POST['email']);
  12.     $phone          = htmlspecialchars($_POST['topic']);
  13.     $comments       = htmlspecialchars($_POST['comments']);
  14.      
  15.     // SET UP EMAIL DATA
  16.     $to             = 'cd@guitarart.co.il';
  17.     $subject        = "הודעה חדשה מלקוח";
  18.     $message        = "הפרטים שהתקבלו הם  \n\n  Name: $name\n  Phone: $phone\n  Message: $comments\n";
  19.     $headers        = "From: $email";
  20.      
  21.     // USE MAIL FUNCTION
  22.     mail($to, $subject, $message, $headers);
  23.      
  24.     // REDIRECT AFTER SEND
  25.     header("Location: http://www.guitarart.co.il/Thanks.php");
  26. }
RAW Paste Data