Advertisement
Guest User

code

a guest
Mar 27th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.92 KB | None | 0 0
  1. <?php
  2.  
  3. if(isset($_POST['submit'])) {
  4.  
  5.  
  6. $to = 'amyarnold.designs@hotmail.com';
  7. $subject = 'Village On Prince Charles Registration';
  8. $from = ''. $email;
  9. $headers = 'From: ' . $from;
  10.  
  11. $name = $_POST['name'];
  12. $email = $_POST['email'];
  13. $postalcode = $_POST['postalcode'];
  14. $group1 = $_POST['group1'];
  15. $realtor = $_POST['realtor'];
  16. $user_bio = $_POST['user_bio'];
  17. $budget = $_POST['budget'];
  18.  
  19. $msg = 'Name: '. $name . "\n"
  20. .'Email: '. $email . "\n";
  21. .'postalcode: '. $postalcode . "\n";
  22. .'group1: '. $group1 . "\n";
  23. .'realtor: '. $realtor . "\n";
  24. .'user_bio: '. $user_bio . "\n";
  25. .'budget: '. $budget. "\n";
  26.  
  27.  
  28. if(mail($to, $subject, $msg, $headers)){
  29. // Success
  30. header('location: thankyou.php');
  31. }
  32. echo "Hello " . $name;
  33. } else {
  34. header('location: index.php');
  35. }
  36. ?>
  37.  
  38.  
  39. --- index ---
  40.  
  41. <!doctype html>
  42. <html class="no-js" lang="en" dir="ltr">
  43. <head>
  44. <meta charset="utf-8">
  45. <meta http-equiv="x-ua-compatible" content="ie=edge">
  46. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  47. <title>Village On Prince Charles</title>
  48. <link rel="stylesheet" href="css/foundation.css">
  49. <link rel="stylesheet" href="css/app.css">
  50. <link href="https://fonts.googleapis.com/css?family=Raleway" rel="stylesheet">
  51. </head>
  52. <body>
  53.  
  54. <section class="logo">
  55. <div class="row">
  56. <div class="large-12 columns">
  57. <div class="logoBox">
  58.  
  59. </div>
  60. </div>
  61. </div>
  62. </section>
  63.  
  64. <section class="hero">
  65. <div class="row">
  66. <div class="large-12 columns">
  67. <div class="heroBox">
  68. <h1>Bungalow Townhomes</h1>
  69. <h3> Starting from the $300's</h3>
  70. <h5> Pre-Registration </h5>
  71. </div>
  72. </div>
  73. </div>
  74. </section>
  75.  
  76. <section class="info">
  77. <div class="row">
  78. <div class="large-12 columns">
  79. <h1> Coming Soon </h1>
  80.  
  81. <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum fringilla mi id posuere ultricies. Nam consequat ac sem nec rhoncus. Vestibulum vitae consectetur ante. Sed eu justo nisi. Proin sodales ante at justo molestie iaculis. Sed laoreet mattis nisi, eget accumsan augue mollis. </p>
  82.  
  83. <p> Etiam vulputate, urna non rhoncus aliquet, orci libero feugiat sapien, a mollis dolor sem sit amet ligula. Vestibulum luctus ligula ut arcu egestas maximus. Suspendisse tortor mi, volutpat tristique accumsan et, fringilla quis ex. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p>
  84.  
  85. <p>Consectetur adipiscing elit. Vestibulum fringilla mi id posuere ultricies. Nam consequat ac sem nec rhoncus. Vestibulum vitae consectetur ante.</p>
  86.  
  87. </div>
  88. </div>
  89.  
  90. </section>
  91.  
  92.  
  93. <section class="register">
  94. <div class="row">
  95. <div class="large-12 columns">
  96.  
  97. <form action='contact.php' method="post" class="edit">
  98.  
  99.  
  100. <fieldset>
  101.  
  102. <h1>Pre-Registration</h1>
  103.  
  104. <div class="large-12 medium-12 small-12 columns">
  105.  
  106. <label for="name">Full Name:</label>
  107. <input type="text" id="name" name="name">
  108.  
  109. <label for="mail">Email:</label>
  110. <input type="email" id="mail" name="email">
  111.  
  112. <Label>Postal Code </Label><input type="text" name="postalcode" title="Four digit zip code" />
  113.  
  114.  
  115. <label>Are you working with a Realtor?</label>
  116. <input type="radio" name="group1" value="yes"> <label>Yes</label>
  117. <input type="radio" name="group1" value="no"> <label>No</label>
  118.  
  119. <label for="job">If yes, then:</label>
  120. <select id="job" name="realtor">
  121. <optgroup label="Realtor">
  122. <option value="representative1">N/A</option>
  123. <option value="representative1">Name1</option>
  124. <option value="representative2">Name2</option>
  125. <option value="representative3">Name3</option>
  126. <option value="representative4"> Name4</option>
  127. <option value="representative5">Name5</option>
  128. <option value="representative6">Name6</option>
  129. </optgroup>
  130. </select>
  131.  
  132. <label for="bio">Comments (optional)</label>
  133. <textarea id="bio" name="user_bio"></textarea>
  134.  
  135. <label for="budget">Budget</label>
  136. <select id="budget" name="budget">
  137. <optgroup label="Web">
  138. <option value="budget1">$300,000 - $400,000</option>
  139. <option value="budget2">$400,000 - $500,000</option>
  140. <option value="budget3">$500,000 - $600,000</option>
  141. <option value="budget4"> $600,000 + </option>
  142. </optgroup>
  143. </select>
  144.  
  145. <input type="submit" name="submit" value="Register" class="button1" />
  146.  
  147.  
  148. </div>
  149.  
  150. </fieldset>
  151. </form>
  152. </div>
  153. </div>
  154. </section>
  155.  
  156. <footer> The Roman Grocholsky Team | 2017 </footer>
  157.  
  158. </body>
  159. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement