Page 1 of 1
dynamic drop down form menu with PHP
Posted: Wed Jan 29, 2014 6:58 pm
by me!
I have a inventory system I am working on and one item I have not decided on how to implement is creating drop down select options in the parts form. My first thought was to just put a "manufactures" column in the db and store all the manufactures as an array. Then loop through them to create the HTML options.
Any thoughts

Re: dynamic drop down form menu with PHP
Posted: Wed Jan 29, 2014 7:13 pm
by requinix
Decide how you want the system to behave first, then figure out what you need to do to support it.
1. What do manufacturers have to do with parts?
2. How do you want the user to choose them?
Re: dynamic drop down form menu with PHP
Posted: Wed Jan 29, 2014 7:25 pm
by me!
When entering a part into the system you will need to specify who the manufacture is. (for ordering) I was thinking of having a drop down list since we only use about 10.
Re: dynamic drop down form menu with PHP
Posted: Wed Jan 29, 2014 7:34 pm
by Celauran
So a table for manufacturers with a foreign key relationship? Makes sense to me.
Re: dynamic drop down form menu with PHP
Posted: Wed Jan 29, 2014 11:08 pm
by me!
Never thought to do a separate table, but I think that is a better option.
Thanks