Changing form action based on dropdown

Discussion in 'PHP' started by ched, Apr 29, 2010.

  1. #1
    I would like to enable my visitors to select one option from a dropdown box then select a second option from a second dropdown box. Then when they press submit the first dropbox option value should be passed to a page that was selected from the second dropdown box.

    Any ideas how I can do this? I would like to avoid java of any sort and ideally have clean url links i.e no ? data.

    Thanks for any help you can give.
     
    ched, Apr 29, 2010 IP
  2. carfanatic01

    carfanatic01 Peon

    Messages:
    239
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Well. dont approve them!! its the best way of thinking uf us...
     
    carfanatic01, Apr 29, 2010 IP
  3. Grit.

    Grit. Well-Known Member

    Messages:
    1,424
    Likes Received:
    22
    Best Answers:
    1
    Trophy Points:
    110
    #3
    If you're bothered about the links, then why not consider URL rewriting using the .htaccess file? I mean you can look at the alternatives to $_GET, but it appears that you already know this solution would work for you, so in essence, the URL rewrite would be all that you need to clean your links up
     
    Grit., Apr 29, 2010 IP
  4. ched

    ched Active Member

    Messages:
    185
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    90
    #4
    Thanks for the fast response. I had thought about htaccess rewrite but I havent ventured into htaccess other than redirect non www to www for a domain. Do you know any decent site that explain how to rewrite the $_GET part using htaccess?
    Once again Thanks.

     
    ched, Apr 29, 2010 IP