Guest User

Untitled

a guest
Apr 19th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. <form method="post" id="contact" name="contact">
  2. <article class="block-300">
  3. <input type="text" name="name" value="Your name">
  4. <input type="text" name="email" value="Email address">
  5. <input type="text" name="subject" value="Why do you want to get in touch?">
  6. <input type="checkbox" name="designer" value="1" id="contact1"/>
  7. <label for="contact1">Davey</label>
  8. <input type="checkbox" name="designer" value="2" id="contact2"/>
  9. <label for="contact2">Dillen</label>
  10. </article>
  11. <article class="block-630 last">
  12. <textarea rows="0" cols="0" name="message"></textarea>
  13. <div class="button">
  14. <a onclick="document.forms['contact'].submit(); return false;" class="c_button m_button"><span>Get in touch</span></a>
  15. <a onclick="document.forms['contact'].submit(); return false;" class="c_button m_button hover"><span>Get in touch</span></a>
  16. </div>
  17. </article>
  18. </form>
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29. and this is my contact.php which is included
  30.  
  31.  
  32. <?php
  33. /*=================
  34. Post values
  35. =================*/
  36. $name = stripslashes($_POST['name']);
  37. $email = stripslashes($_POST['email']);
  38. $subject = stripslashes($_POST['subject']);
  39. $message = stripslashes($_POST['message']);
  40.  
  41. if(!empty($name) && !empty($email) && !empty($subject) && !empty($message)){
  42. echo $name ."<br>". $email ."<br>" . $subject ."<br>". $message;
  43. }
  44.  
  45. ?>
Add Comment
Please, Sign In to add comment