[PHP] Parsing of forms
I noticed that php's way to fill $_GET and $_POST is particularly inefficient when it comes to handling multiple inputs with the same name. This basically mean that every select multiple in order to function properly needs to have a name ending in '[]'. Wouldn't it be easier to also make it so that any element that has more than one value gets added to the GET/POST array as an array of strings instead of a string with the last value? I can see the comfort of having the brackets system to create groups of inputs easily recognizable as such, while I can overlook the impossibility of having an input literally named 'foobar[]', having to add [] everytime there is a slight chance of two inputs with the same name. This sounds flawed to me, as I could easily append '[]' to every input name and have a huge range of possibilities unlocked by that. This can't be right. Or can it? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Parsing of forms
I noticed that php's way to fill $_GET and $_POST is particularly inefficient when it comes to handling multiple inputs with the same name. This basically mean that every select multiple in order to function properly needs to have a name ending in '[]'. Wouldn't it be easier to also make it so that any element that has more than one value gets added to the GET/POST array as an array of strings instead of a string with the last value? I can see the comfort of having the brackets system to create groups of inputs easily recognizable as such, while I can overlook the impossibility of having an input literally named 'foobar[]', having to add [] everytime there is a slight chance of two inputs with the same name. This sounds flawed to me, as I could easily append '[]' to every input name and have a huge range of possibilities unlocked by that. This can't be right. Or can it? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php