Topic: Multiselect - transmitting values via POST

belu pro asked 5 years ago


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 answered 5 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 5 years ago


Thanks a lot! A really dumb error!!


MDBootstrap staff commented 5 years ago

Topic resolved. Closing.


FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Closed

Specification of the issue

  • ForumUser: 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