returnButton
Programmer
Hi.. I'm trying out a GET form for the 1st time, and I want to pass a load of fields as an array. This is for a filter, which will have things like "start from page", "display per page", "category type" etc etc.
I've named all the fields the same, ie
and when submitted I get
Ideally I would like this passed as one variable, something like:
That way, I can just deal with one variable in my PHP. Plus, the URL is a lot shorter & neater.
Is this doable? Anyone done anything like this before? thanks : )
I've named all the fields the same, ie
Code:
<input name="filter[]" value="start:1">
<input name="filter[]" value="perpage:10">
and when submitted I get
Code:
&filter[]=start:1&filter[]=perpage:10
Ideally I would like this passed as one variable, something like:
Code:
&filter[]=start:1,perpage:10
That way, I can just deal with one variable in my PHP. Plus, the URL is a lot shorter & neater.
Is this doable? Anyone done anything like this before? thanks : )