WordPress.org

Support

Support » Plugins and Hacks » Hacks » How to pass form values

How to pass form values

  • Hello,
    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:
    http://wordpress.pastebin.com/EQSPiFc0

    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.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to pass form values’ is closed to new replies.