[Libwebsockets] Parse form with array values

Sylvain Lefebvre sylwus99 at hotmail.com
Sun Oct 18 04:39:42 CEST 2020


Hi,

Is there a way to parse a form which post array values. For example if I have the following in my html page.

<input type="text" name="foo[]" value="bar">
<input type="text" name="foo[]" value="baz">

If I use "foo" as a param in param_names[] it returns nothing.

The only way I can get a value is if I append %5B%5D to the param name. So, if I use "foo%5B%5D" it returns 'bar' but nothing else. How can I get 'bar' and 'baz'? One of my page will have a 16 X 16 array. I would like to avoid writing 256 different params!

Regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20201018/8192f31b/attachment.htm>


More information about the Libwebsockets mailing list