Hi. I am new to PHP and would like some help with my select list. I have looked at many places but unfortanately, tutorials I have looked at are either not what I'm specifically looking for or do not even cover them. I'm looking to have a select list and upon selecting an option, it displays an image under the list.
Thank you
Code:
<form name="jump" method="post" action="/routes.php">
<p align="center">
<select name="menu">
<option value="/x.php?=0">Select a Route</option>
<option value="/x.php?=1">1</option>
<option value="/x.php?=4">4</option>
<option value="/x.php?=15">15</option>
</select>
<input type="button" onClick="GO">
</form>
Code:
<?
if (value == 0) {
echo '<img>/images/allroutes.gif</img>';
echo '';
}
else if (value == 1) {
echo "<img>/images/route01.gif</img>";
echo "";
}
else if (value == 4) {
echo '<img>/images/route04.gif</img>';
echo '';
}
else if (value == 15) {
echo '<img>/images/route15.gif</img>';
echo '';
?>
Comment