View difference between Paste ID: djjDHeyH and UNPNVNJx
SHOW: | | - or go back to the newest paste.
1
<div id="content">
2-
	<div id="textArea">
2+
  <div id="textArea">
3
    How are you getting here? <br>
4
    
5-
  		<form action="gettinghere.php" method="post">
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-
        </form>
14+
15-
  	</div>
15+
    </form>
16
  </div>
17
</div>
18
19
<!-- ----------------------------------------------------------- -->
20
21-
if ($_POST("radiogroup") == "Car")
21+
22-
	{
22+
$transportType = $_POST['radiogroup'] ?: $_POST['othertransport'];
23-
		echo 'Thanks for your input, you are travelling here by '.$_POST[	"radiogroup"];
23+
echo "Thanks for your input, you are travelling here by $transportType";	
24-
	}
24+