Results 1 to 2 of 2
  1. #1
    Join Date
    May 2004
    Posts
    1

    Unanswered: Dynamic Drop Down Box

    Hi everyone: I am new to PHP, and am having some problems getting the results I am looking for.

    I am creating a search page with a category drop down box, search string input box, and a submit button. I would like to have a second drop down box called sub-category, dynamically appear if the user selects a category. I need to pass the POST variables to a second page called searchResult.php when the submit button is pressed.

    Unfortunately, I can only seem to get one or the other to work.... Post to the searchResult.php page, OR post to PHP_SELF and redraw the page with the subcategory drop down. I am probably missing something simple to bring it all together.

    Any suggestions would be greatly appreciated.
    Thanks in advance,
    CodeCreation

  2. #2
    Join Date
    Feb 2002
    Location
    San Francisco, CA
    Posts
    441
    Your probably loosing the POST variables when the drop down box appears ---> If so, you need to "save" these somehow.

    Its up to you how. I either go through the post array and pick out certain variables and then write a hidden form element out, or just re-populate the orginal form elements value field.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •