Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

PHP Creating a Chained Drop Down Menu reading a csv file

Gazza58

Coder
Hello I'm hoping someone can assist me, I'm looking at creating a Chained Drop Down Menu that reads data from a csv file using PHP. I have a single level drop down that works fine, but I'm looking to expand this into a Multi level menu so I can read all my data from the one CSV File (currently I use a separate Javascript menu for the Chained Drop Down so have to maintain a csv file and javascript file)

My CSV file is used to read data on other pages hence I would like to only maintain the one file. This has the following options, the key cells I need to read are the Section; Team Name, Comp1,Front Pin, Comp2 and KO

Section,Number,Team Name,Home Alley,Home Night,Captain,Vice Captain,Capt Phone,Vice Phone,Team Link,Food,Comp1,Front Pin,Comp2,KO

The First Level will have the following Options and needs to read the following from the CSV file for Levels below

Section A - If Section = A, list Team Name
Section B - If section = B, list Team Name
Section C - If Section = C, List Team Name
Section D - If Section = D, List Team Name
Ladies Section A - If Section = LA, List Team Name
Ladies Section B - If Section = LB, List Team Name
Front Pin - If Comp1 = FP and Front Pin = Y, List Team Name
Ladies Front Pin - If Comp1 = LFP and Front Pin = Y, List Team Name
Stroud News - If Comp2 = SNJ and KO = Y, List Team Name
Margaret Jennings - If Comp2 = MJT and KO = Y, List Team Name

The javascript version is working under www/stroudskittles.co.uk/scorecard.php but for this I have to maintain a separate file (I'm currently working on cleaning up the complete site to fix errors and update to use css)

If anyone can help it would be appreciated

Many Thanks
 

New Threads

Buy us a coffee!

Back
Top Bottom