pulldown menus using PHP

Discussion in 'PHP' started by cashboy, Apr 20, 2006.

  1. #1
    I am working on a site that is going to be listing diners in my town and local cities. I have been reading up the tutorial on the sitepoint.com site with PHP and mysql. Well I have been going thru that pretty good. But I have one question. How would i setup a pulldown menu so that when you would say select munster it would go to the database and pull the information out of the database and put it on the page.

    I am not clear with the way to set up the pulldown menu. I know how i could do this with just a standard link but not a pulldown menu. Thank you for your help in advance.
     
    cashboy, Apr 20, 2006 IP
  2. drewbe121212

    drewbe121212 Well-Known Member

    Messages:
    733
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    125
    #2
    I would say their are to options available for this, each one includes javascript (no doubt).

    First:
    Pull out all the results that could possibly happen into an array and sort through the array accordingly.

    ie array('value1' => 'This is the content for value 1 blah blah blah blah',
    'value2' => 'this is the content for value 2 hoohaahh blah bleh blah');

    Then simply use div's to show which value

    Second option:
    AJAX - I have no idea how to use it, but I may recommend this site http://www.ajaxfreaks.com
     
    drewbe121212, Apr 21, 2006 IP
  3. frankcow

    frankcow Well-Known Member

    Messages:
    4,859
    Likes Received:
    265
    Best Answers:
    0
    Trophy Points:
    180
    #3
    frankcow, Apr 21, 2006 IP