Advertisement
Guest User

Untitled

a guest
Nov 19th, 2012
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.79 KB | None | 0 0
  1. <form method="post" action="report.php">
  2. <label for="firstname">First name:</label>
  3. <input type="text" id="firstname" name="firstname" /><br />
  4. <label for="lastname">Last name:</label>
  5. <input type="text" id="lastname" name="lastname" /><br />
  6. <label for="email">What is your email address?</label>
  7. <input type="text" id="email" name="email" /><br />
  8. <label for="whenithappened">When did it happen?</label>
  9. <input type="text" id="whenithappened" name="whenithappened" /><br />
  10. <label for="howlong">How long were you gone?</label>
  11. <input type="text" id="howlong" name="howlong" /><br />
  12. <label for="howmany">How many did you see?</label>
  13. <input type="text" id="howmany" name="howmany" /><br />
  14. <label for="aliendescription">Describe them:</label>
  15. <input type="text" id="aliendescription" name="aliendescription" size="32" /><br />
  16. <label for="whattheydid">What did they do to you?</label>
  17. <input type="text" id="whattheydid" name="whattheydid" size="32" /><br />
  18. <label for="fangspotted">Have you seen my dog Fang?</label>
  19. Yes <input id="fangspotted" name="fangspotted" type="radio" value="yes" />
  20. No <input id="fangspotted" name="fangspotted" type="radio" value="no" /><br />
  21. <img src="fang.jpg" width="100" height="175"
  22. alt="My abducted dog Fang." /><br />
  23. <label for="other">Anything else you want to add?</label>
  24. <textarea id="other" name="other"></textarea><br />
  25. <input type="submit" value="Report Abduction" name="submit" />
  26. </form>
  27. </body>
  28. </html>
  29.  
  30.  
  31. <html>
  32. <head>
  33. <title>Aliens Abducted Me - Report an Abduction</title>
  34. </head>
  35. <body>
  36. <h2>Aliens Abducted Me - Report an Abduction</h2>
  37. <?php
  38. $name = $_POST['firstname'] . ' ' . $_POST['lastname'];
  39. $when_it_happened = $_POST['whenithappened'];
  40. $how_long = $_POST['howlong'];
  41. $how_many = $_POST['howmany'];
  42. $alien_description = $_POST['aliendescription'];
  43. $what_they_did = $_POST['whattheydid'];
  44. $fang_spotted = $_POST['fangspotted'];
  45. $email = $_POST['email'];
  46. $other = $_POST['other'];
  47. $to = 'owen@aliensabductedme.com';
  48. $subject = 'Aliens Abducted Me - Abduction Report';
  49. $msg = "$name was abducted $when_it_happened and was gone for $how_long.\n" .
  50. "Number of aliens: $how_many\n" .
  51. "Alien description: $alien_description\n" .
  52. "What they did: $what_they_did\n" .
  53. "Fang spotted: $fang_spotted\n" .
  54. "Other comments: $other";
  55. mail($mymail, $subject, $msg, 'From:' . $email);
  56. echo 'Thanks for submitting the form.<br />';
  57. echo 'You were abducted ' . $when_it_happened;
  58. echo ' and were gone for ' . $how_long . '<br />';
  59. echo 'Number of aliens: ' . $how_many . '<br />';
  60. echo 'Describe them: ' . $alien_description . '<br />';
  61. echo 'The aliens did this: ' . $what_they_did . '<br />';
  62. echo 'Was Fang there? ' . $fang_spotted . '<br />';
  63. echo 'Other comments: ' . $other . '<br />';
  64. echo 'Your email address is ' . $email;
  65. ?>
  66. </body>
  67. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement