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

  • mariostella


    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • superyetkin


    You need to call the PHP code before the form code.

    Donate if this helps you.



    That is of course not on the same file. I just posted everything on pastebin on the same document for easy of use. Does not help, thanks anyway.

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