PHP/CGI form processing with same-named checkboxes
Posted: Wed Oct 15, 2008 9:18 am
Dear All,
Bit of a headscratcher this one - I hope you guys can help.
I'm trying to process a form automatically using PHP and CURL. It all goes fine until there are multiple checkboxes with the same name, eg.
<input type="checkbox" name"cb1" value="1" />
<input type="checkbox" name"cb1" value="2" />
Now the form is actually processed using a CGI script that I don't have access too. I'm passing the form variables to the cgi script using PHP & CURL. But because PHP can't cope with same-named checkboxes without an array attached (ie. cb1[]), and attaching the array confuses the CGI script, I'm stuck.
Anyone got any idea how I can get the scripts to talk to each other?
Thanks in advance,
Rob
Bit of a headscratcher this one - I hope you guys can help.
I'm trying to process a form automatically using PHP and CURL. It all goes fine until there are multiple checkboxes with the same name, eg.
<input type="checkbox" name"cb1" value="1" />
<input type="checkbox" name"cb1" value="2" />
Now the form is actually processed using a CGI script that I don't have access too. I'm passing the form variables to the cgi script using PHP & CURL. But because PHP can't cope with same-named checkboxes without an array attached (ie. cb1[]), and attaching the array confuses the CGI script, I'm stuck.
Anyone got any idea how I can get the scripts to talk to each other?
Thanks in advance,
Rob