I am setting up a database currently and I want frequently used values stored in a Code table on my database. The Code table is setup with the following columns: Type_CD" , "Code" , "Description". For example, if I wanted to pull a list of states, I would want all records that are "Type_CD" number 2, which would have a variety of codes ranging from 20001 to 20052. So, let's say the state of VA would be a Type_CD of "2", a Code of "20047", and a description of "VA".
With this in mind, how would I create a drop down menu in PHP that dynamically generates these values in a form? For example, let's say I wanted a registration form that grabbed all of Type_CD "2" from the Database and then populated these values in the "State" Field on the Form?
Thanks for the help!