• Hi Guys, i’ve been trying for weeks to achieve something in WP, i’ve since almost given up and then found that a member of this forum karimum has *almost* solved the problem for me!

    All I really want to do is have 2 drop down boxes which will each contain a few WP Tags, then I want the user to select one tag from each drop down, SUbmit the form and redirect to a page with url /?tag=TAG1+TAG2

    Karimum posted a reply in this thread https://www.ads-software.com/support/topic/154454?replies=5#post-694062 and his code appears to do EXACTLY what I need. However it just can’t quite get it working.

    The form code is perfect, the initial PHP all looks like it makes sense to me (though i’m no expert) but when I then add it into a page containing ‘the loop’ I get syntax errors!.

    Karimum if you read this it would be fantastic if you could help me get this working, after you went to the effort of writing the code the the original poster a year ago who didn’t go on to use it.

    If anybody else understands this code please help, i’m sure it’s only a minor issue.

    Thanks for your time!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter fluffypig

    (@fluffypig)

    If nobody else can help with this, does anybody know of a way to contact Karimum?

    Thanks

    Thread Starter fluffypig

    (@fluffypig)

    UPDATE:

    I’ve been told

    1. You shouln’t use $_GLOBALS, rather use $_POST.
    2. you need to use isset() function to test to see if a post has been made, other wise the PHP thinks the form is always posting.
    3. You are not echoing the form action /<?php $PHP_SELF ?>/ should be /<?php echo $PHP_SELF ?>
    /4. Security wise you need some basic form validation and filtering, #1 is also a concern.

    Does that mean anything to anybody?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Searching With 2 Dropdown Boxes (Karimum)’ is closed to new replies.