Advertisement
Guest User

Untitled

a guest
Oct 16th, 2013
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. <div id="content">
  2. <div id="textArea">
  3. How are you getting here? <br>
  4.  
  5. <form action="gettinghere.php" method="post">
  6. <input type="radio" name="radiogroup" value="Car">Car<br>
  7. <input type="radio" name="radiogroup" value="Train">Train<br>
  8. <input type="radio" name="radiogroup" value="Bus">Bus<br>
  9. <input type="radio" name="radiogroup" value="Bicycle">Bicycle<br><br>
  10. <label for="othertransport"> Please Enter Any Other Means Of Transport Here </label><br>
  11. <input type="text" name="othertransport" /><br>
  12. <input type="submit" name="submit" />
  13.  
  14. </form>
  15. </div>
  16. </div>
  17.  
  18.  
  19.  
  20. <?php
  21. if ($_POST("radiogroup") == "Car")
  22. {
  23. echo 'Thanks for your input, you are travelling here by '.$_POST[ "radiogroup"];
  24. }
  25.  
  26. if ($_POST("radiogroup") == "Bus")
  27. {
  28. echo 'Thanks for your input, you are travelling here by '.$_POST["radiogroup"];
  29. }
  30.  
  31. if ($_POST("radiogroup") == "Train")
  32. {
  33. echo 'Thanks for your input, you are travelling here by '.$_POST["radiogroup"];
  34. }
  35.  
  36. if ($_POST("radiogroup") == "Bicycle")
  37. {
  38. echo 'Thanks for your input, you are travelling here by '.$_POST["radiogroup"];
  39. }
  40.  
  41. else {
  42. echo 'Thanks for your input, you are travelling by '. $_POST["othertransport"];
  43. }
  44.  
  45. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement