Seems like I used to know how to do this, but I'm getting old and my brain only works when it wants to these days.
I'm allowing the user to create a SELECT list by adding items to it and reordering them, and need to be able to submit the entire list, in order, instead of only sending the list items the user might have selected.
Seems like I used to use Javascript to iterate through the list and add each item to a hidden field, then submit the hidden field along with the form, but that seems pretty clunky in retrospect.
I'm using PHP for server-parsed code, might there be a clean way to do this with PHP, like maybe name the SELECT like a PHP array (<select name="listname[]">) and let PHP deal with the list as an array?
Any suggestions would be apprciated.
I'm allowing the user to create a SELECT list by adding items to it and reordering them, and need to be able to submit the entire list, in order, instead of only sending the list items the user might have selected.
Seems like I used to use Javascript to iterate through the list and add each item to a hidden field, then submit the hidden field along with the form, but that seems pretty clunky in retrospect.
I'm using PHP for server-parsed code, might there be a clean way to do this with PHP, like maybe name the SELECT like a PHP array (<select name="listname[]">) and let PHP deal with the list as an array?
Any suggestions would be apprciated.