Hello Reader's!
If you need to set a option box with multiple select options then you can use the logic below:-
Logic is to set the name of your option box in array format, Like
<select name="flower[ ]" multiple>
Lets see the example below:-
<html>
<body>
<form method="post" action="value.php">
<select name="flower[ ]" multiple>
<option value="flower">FLOWER</option>
<option value="rose">ROSE</option>
<option value="lilly">LILLY</option>
<option value="jasmine">JASMINE</option>
<option value="lotus">LOTUS</option>
<option value="tulips">TULIPS</option>
</select>
<input type="submit" name="submit" value=Submit>
</form>
</body>
</html>
Now the user can select the multiple values and each values will be generated in the array keys
0 Comment(s)