|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Using Drop Downs in PHP/MYSQL
I am hoping that someone can help me with the following project. I am helping out a nonprofit by designing a program using mysql and php that will allow them to automate the "registration" process for a conference.
What I need it to do, is to pull data from several databases and allow the person who is using the program to add people and edit people from the database. Right now I merely do all the work manually, but there must be an easier way. Here is what I have. One database that has the following fields: ID, Committee, Country, School, Delegate1, Delegate2. There are 7 committees, between 15-35 countries (different for each committee), several schools, and obviously the delegates would be different. I need the program to have a series of drop boxes. First you select the committee, then based on what you selected from the committee the seonc drop box should show the countries that are specific for that committee. Then the key is that only countries that are available (or do not contain a school name) should show up under the country part. Finally you should be able to submit that information and add a school to the available country. I have another database (school) that has the list os schools and can probably figure out how to integrate it later. Anyone have any suggestions on where to start? I got a drop box already based on the committee's, but beyond that I am stuck. Thanks to all who help!! Jamie |
|
#2
|
||||
|
||||
|
You might want to redesign your tables.
what's the name of the table you've presented to us? based on your description of the flow, I think you could have a one-to-many or even many-to-many relationship in there. For example, how many delegate's can a committee have? Can one committee belong to various countries? and can one country have many committees? The idea is to eliminate "redundant data"... meaning, anything that is going to repeat a lot... If you have to type "United States of America" over and over again in the Country field, you might make a mistake... or someone else might put "USA"... Perhaps making country its own table, and putting a foreign key in this table would be a better solution. Unless I've misunderstood your terms... I believe where you are saying "database" you mean "table"... but you haven't indicated any foreign keys, so I just want to clarify. Its better to iron out these database issues now, than fix them later and be forced to modify all your coding. |
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > Using Drop Downs in PHP/MYSQL |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|