passing an array using $_GET
Posted: Tue Jan 31, 2006 3:54 am
Hi,
I currently have a form that uses $_POST to send an array of checked (checkbox) values. My PHP script goes through each element in the array and deletes from the database.
However, I want to do it using $_GET, so my URL will look like action=deletechecked&checklist=1,2,3,4,5 etc
I tried it and it currently looks like this
There's a &checklist=## for each element.
Would I need to use javascript to get these into a list? Or can I not do this using $_GET?
I currently have a form that uses $_POST to send an array of checked (checkbox) values. My PHP script goes through each element in the array and deletes from the database.
However, I want to do it using $_GET, so my URL will look like action=deletechecked&checklist=1,2,3,4,5 etc
I tried it and it currently looks like this
Code: Select all
&action=deletechecked&checklist=360849&checklist=360841&checklist=360836&checklist=360830&checklist=360820&checklist=360808&checklist=360804&checklist=360797&checklist=360400&checklist=360379&checklist=360337&checklist=360318&checklist=360294&checklist=360290&checklist=358486Would I need to use javascript to get these into a list? Or can I not do this using $_GET?