Hello,
I have been working on a site that is now using dropdown lists that allow multiple selections. When the form is submitted, the dropdown selections are converted to lists via code like this:
$areas = implode("','",$_POST['area']);
Then in a mySQL query, the value of $areas is used like this:
AND Area IN('$areas')";
This works fine to bring back query results filtered by the values in the $areas list.
But if there are a lot of results, the first page displays only 10 of them. Previous/next code was in place to allow navigation to other pages and also provided numbers for the pages and those could be used as well. These navigation links work by passing the query criteria as query string values. However, trying to pass the value of $area which may contain multiple values from the dropdown list sends only the string 'array' and the page fails when it reloads. The value of $area is no longer useful.
Does anyone know how to pass the multiple values from the dropdown selection into the navigation query string for navigation to another set of results?
I have been working on a site that is now using dropdown lists that allow multiple selections. When the form is submitted, the dropdown selections are converted to lists via code like this:
$areas = implode("','",$_POST['area']);
Then in a mySQL query, the value of $areas is used like this:
AND Area IN('$areas')";
This works fine to bring back query results filtered by the values in the $areas list.
But if there are a lot of results, the first page displays only 10 of them. Previous/next code was in place to allow navigation to other pages and also provided numbers for the pages and those could be used as well. These navigation links work by passing the query criteria as query string values. However, trying to pass the value of $area which may contain multiple values from the dropdown list sends only the string 'array' and the page fails when it reloads. The value of $area is no longer useful.
Does anyone know how to pass the multiple values from the dropdown selection into the navigation query string for navigation to another set of results?