How to pass form values
Trying to filter my posts using query_posts. The posts should be filtered by category. I am using an array to only return posts that belong to all the categories at once. I got this part working.
The problem arises when I implement a form with 4 checkboxes, one per each category, which the user should select, then submit and see a list of posts that only belong to the selected categories.
The following is my not working code:
Nothing is returned. The URL of the page does change including the selected checkbox value. When I try to echo $cats, I only get three commas, no category names, or values.
I think I have a syntax error, but cannot get around it.
- The topic ‘How to pass form values’ is closed to new replies.