Question about parsing POST data

27 views
Skip to first unread message

Tamer Temizer

unread,
May 31, 2018, 8:16:31 AM5/31/18
to civetweb
Hi, in my application I have a populated table. User can add/delete rows from the table. Each row has multiple input elements like dropdowns and textboxes. I use the same 'name' for all elements in the same column as I'm populating them. Is there a way in civetweb to parse a post data with multiple fields with the same name? mg.get_var only returns the last element's value if there are multiple elements with the same name. php allows the following syntax : name="foo[]" but I didn't have any chance with it on Lua.

Thanks.

bel

unread,
Jun 1, 2018, 1:01:23 PM6/1/18
to Tamer Temizer, civetweb
There are multiple ways to do this.

On Thu, May 31, 2018 at 2:16 PM, Tamer Temizer <temi...@gmail.com> wrote:
Hi, in my application I have a populated table. User can add/delete rows from the table. Each row has multiple input elements like dropdowns and textboxes. I use the same 'name' for all elements in the same column as I'm populating them. Is there a way in civetweb to parse a post data with multiple fields with the same name? mg.get_var only returns the last element's value if there are multiple elements with the same name. php allows the following syntax : name="foo[]" but I didn't have any chance with it on Lua.

Thanks.

--
Sourceforge
https://sourceforge.net/projects/civetweb/
---
You received this message because you are subscribed to the Google Groups "civetweb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to civetweb+unsubscribe@googlegroups.com.
To post to this group, send email to cive...@googlegroups.com.
Visit this group at https://groups.google.com/group/civetweb.
To view this discussion on the web visit https://groups.google.com/d/msgid/civetweb/d289b9bf-ee1f-4012-86ff-71af5b5e1443%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages