populating multiple outputs from dropdown choice

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Neekos
    New Member
    • Aug 2007
    • 111

    populating multiple outputs from dropdown choice

    i have a MySQL table that contains a list of employees, their employee ID, and their supervisors name. On my page i have a dropdown menu populated with the supervisors name. When a person selects a supervisor, i want the next page to populate a list of all of their employees.

    I originally had this set up with all of the employees names in the drop down, and the next page would populate info based on that person - and i was able to accomplish this one to one transfer, but I'm having trouble pulling back a one to many. I'm guessing i need to use a while loop, but am not sure how to accomplish this.

    Can anyone help me out with this?
  • pbmods
    Recognized Expert Expert
    • Apr 2007
    • 5821

    #2
    Heya, Neekos.

    What's your table structure look like?

    Comment

    • r035198x
      MVP
      • Sep 2006
      • 13225

      #3
      You should therefore run a select from the database using the entered supervisor. Something like
      [CODE=mysql]select * from employees where supervisor = '$entered_Super Visor';[/CODE]
      and use those results to populate the next page.

      Comment

      Working...