Given a list of items and the task is to retrieve the multiple selected value from a select box using PHP.
Use multiple attribute in HTML to select multiple value from drop down list. Selecting multiple values in HTML depends on operating system and browser.
- For window users – hold down + CTRL key to select multiple option
- For mac users – hold down command key to select multiple option
Example: This example creates a list of items using HTML.
Now, the task is to retrieve or print multiple selected value from list. Use form method and loop to retrieve selected value in PHP.
Note: The form can be submitted using $_GET method. It depends on the form method=”?” value.
- How to select and upload multiple files with HTML and PHP, using HTTP POST?
- How to get selected text from a drop-down list using jQuery?
- How to get file input by selected file name without path using jQuery ?
- How to make a placeholder for a 'select' box?
- How to remove items from a select box ?
- How to select multiple columns in a pandas dataframe
- HTML | DOM Select multiple Property
- HTML | <select> multiple Attribute
- How to select an element with multiple classes using jQuery ?
- How to Select Multiple Files using HTML Input Tag ?
- How to return multiple values from function in PHP?
- How to get N options from the <select> element using JQuery?
- How to get select element's value in react-bootstrap ?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.