Topic: Multiselect - transmitting values via POST
Hello,
I want to use a multiselect. How can I transmit the values via $_POST. At the moment there shows up only one of the selected values in the $_POST variable in the processing file. I would need an array like on a normal html-select element.^ I would also like not to use the "save" button within the multiselect, but the submit button of my form, because there are more fields and not only the multiselect^.
Thanks in advance!
Sebastian Kaczmarek staff pro premium answered 6 years ago
Make sure you have added name
attribute to the <select>
element. Also, keep in mind that the name you provided ends with []
since this is a Multiselect so PHP must see those values as an array
belu pro answered 6 years ago
Thanks a lot! A really dumb error!!
Closed
This topic is closed.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Closed
- User: Pro
- Premium support: No
- Technology: MDB jQuery
- MDB Version: 4.7.3
- Device: all
- Browser: all
- OS: all
- Provided sample code: No
- Provided link: No