SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Member
    Join Date
    Oct 1999
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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 webmasterbase.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.



  2. #2
    ********* Addict
    Join Date
    Apr 2000
    Location
    Posts
    272
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To the best of my knowledge, you can't achieve that effect using any server-side tools (please tell me if I'm wrong). One of the best ways to do this is using hierarchical menus. They have a very good (and compatible) script for doing exactly what you want. It will take a while for you to get it to work but is well worth it.

  3. #3
    SitePoint Enthusiast
    Join Date
    Dec 1999
    Location
    Munster
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I wanted to use the pull down menus because it fits the page layout better and makes it a lot nice page layout. if you would look to look at the layout check it out at http://www.webcitynet.com/food I would really like to know if this would be able to do the pull down menus. Thanks for your help

  4. #4
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    webcitynet,

    I'm trying to figure out what the stumbling block is for you... The pulldown menus are just forms... so you set the VALUE attributes of the <OPTION> tags to the database ID of the items you want to retrieve, and the ACTION attribute of the <FORM> tag to a PHP page that will use the selected ID to fetch the data from the database and display it. There are numerous examples of this in my article series.

    Ideally, you should also be building your pulldown menus with PHP by fetching a list of all items in the database and building your <OPTION> tags with that list.

    Let me know what specifically is tripping you up and I'll try to help!

    ------------------
    -Kevin Yank.
    http://www.SitePoint.com/
    Helping Small Business Grow Online!

  5. #5
    SitePoint Enthusiast
    Join Date
    Dec 1999
    Location
    Munster
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you for your fast post. If you could please tell me what section to look at in your articles to have the pulldown menus generated thru php that would be really great. Thank you for your help.

    Dave

  6. #6
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Part 6: "A Content Management System" has several examples of pulldowns created with and processed by PHP. Although they are used to create admin screens in these examples (e.g. offering a pulldown of author names to select from when adding/updating a joke in the database), the principles are the same.


    ------------------
    -Kevin Yank.
    http://www.SitePoint.com/
    Helping Small Business Grow Online!

  7. #7
    SitePoint Enthusiast
    Join Date
    Dec 1999
    Location
    Munster
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you for your help. That was my fault that i did not see that section. I had those articels saved for offline view. And I did not relize that i was still viewing the offline version of the aticles. That was my fault. Thank you for your great articles. They helped me out a lot.

    Dave


Bookmarks

Posting Permissions

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