1// Page containing a form:
2<form action="myaction.php" method="post">
3 <select name="fruit">
4 <option value="Apple">Apple</option>
5 <option value="Banana">Banana</option>
6 </select>
7 <input type="submit" value="Submit">
8</form>
9
10// myaction.php
11Hello <?php echo htmlspecialchars($_POST['fruit']); ?>