Dear All,
In my work, I have to select multiple values from a drop down box and display them on screen. For that I wrote the following two php files. But the problem is when I select multiple values and click on "submit", it is returning the last selected value only. Hence I request all of you to please tell me a way to select multiple values in drop down box and display them on screen.
mselection.php: -
<html>
<body>
<FORM name="Register" action="mseltest.php" method="post">
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111"
width="38%" id="AutoNumber1">
<tr>
<td width="100%"><select size="3" name="monChoice" multiple>
<option value="January">January</option>
<option value="Febrary">Febrary</option>
<option value="March">March</option>
<option value="April">April</option>
<option value="May">May</option>
<option value="June">June</option>
<option value="July">July</option>
</select></td>
</tr>
<tr>
<td width="100%"><input type="submit" value="Submit" name="B1"></td>
</tr>
</table>
</center>
</div>
</form>
</body>
</html>
<?php
?>
mseltest.php: -
<?php
echo $monChoice,"This is multiple selection";
?>
Thanking you,
Regards,
Indrajit.