Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: drop down table

  1. #1
    Regular Coder
    Join Date
    Nov 2006
    Posts
    601
    Thanks
    1
    Thanked 2 Times in 2 Posts

    drop down table

    hey guys me again... ok im looking for a quick fix... i have a massive list of clubs around 600 and i want to put them into a drop down table... the problem is i only have it liek this
    Abbey AC,
    Abbey Runners,
    Aberdeen AAC,
    Aberdeen University AC,
    Abergele Harriers,
    Aberystwyth AC
    Abingdon Amblers AC
    and typing <option Abbey AC, ect ect will take me ages...is there a quicker way of doing this??

  • #2
    Master Coder
    Join Date
    Apr 2003
    Location
    in my house
    Posts
    5,211
    Thanks
    39
    Thanked 201 Times in 197 Posts
    Is your list stroed in a MySQL db or a flat file? If in a Db, you might look into categorising them and then using a double combo drop down, where the first combo has the category and the second automatically populates with the clubs, based on the category chosen in the first drop down.

    If your use a db and a server side language, you can achive this much more easily and make it a lot more manageable at the same time, with a lot less code than if simply written into an html page.


    bazz

  • #3
    Regular Coder
    Join Date
    Nov 2006
    Posts
    601
    Thanks
    1
    Thanked 2 Times in 2 Posts
    at the moment its on a word file lol... would thrre be a fast way of getitng it nto my db or is it just a case of typing it in... i was going to input the result from the dropdown into my db anyway you see

  • #4
    Master Coder
    Join Date
    Apr 2003
    Location
    in my house
    Posts
    5,211
    Thanks
    39
    Thanked 201 Times in 197 Posts
    Steps:

    1. you'll need to set up your db.
    2. then you could save the word file as a csv and upload it to your server.
    3. use phpMyAdmin (for example), to insert it to the db table.
    4. build a script to query that db table and populate the drop down.
    5. make sure those drop downs are in an html form.
    6. submission of the form should lead to a second script.
    7. That script should takle the params from the form, check them for safety and input them to the db.

    You'll need the db, server-side language (perl/php etc), css, possibly JS and a load of time.

    I would suggest you plan your tables structure for the db, paying good atention to 'normalisation' techniques. then build your scripts.

    You may also need a script to add new clubs and/or categories to the db.


    bazz


  •  

    Posting Permissions

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