Advertisement
Guest User

Untitled

a guest
Oct 16th, 2013
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.  
  11.         <input type="radio" name="radiogroup" value>Other<br>
  12.         <label for="othertransport"> Please Enter Any Other Means Of Transport Here </label><br>
  13.         <input type="text" name="othertransport" /><br>
  14.         <input type="submit" name="submit" />
  15.     </form>
  16.   </div>
  17. </div>
  18.  
  19. <!-- ----------------------------------------------------------- -->
  20.  
  21. <?php
  22. $transportType = $_POST['radiogroup'] ?: $_POST['othertransport'];
  23. echo "Thanks for your input, you are travelling here by $transportType";   
  24. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement