Code: Select all
test.php
<?php
foreach($sel as $val)
print "$val<br>";
?>
<FORM METHOD=POST ACTION=test.php>
<select multiple name=sel>
<option value=1>one</option>
<option value=2>two</option>
<option value=3>three</option>
<option value=4>Four</option>
</select>
<input type=submit value=submit>
</form>if i give multiple select as
<select multiple name=sel[]>
my code is executing and showing the selected values.
but i want to execute my code with
<select multiple name=sel>
is there any way out