i want to know how can we select more than one option from a select box like given below:
inorder to use multiple values for a named parameter in $_GET
/$_POST
/$_REQUEST
arrays in PHP, you have to name your form field like this:
name="myFieldName[]";
by puting the braces at the end of the name of the field, PHP will be able to store multiple values for that paramter. if you are using multiple checkboxes, or multiple selects, you should name your fields like this. and don't forget the values for HTML option tags.
in your case, the HTML should be like this:
your PHP code that is the action of the form can have the data like this.
$mySelectValues = $_REQUEST['some-select'];
// mySelectValues is an array now
foreach ($mySelectValues as $selected) {
echo $selected;
}
when you are viewing your HTML page, you can select multiple options by holding the Ctrl key and then selecting other options.