Hi, I am still relatively new to PHP and am looking for some help.
On my site i have a form set up that has a bunch of text boxes the user fills in and hits submit, the info entered is then entered into a table in my database. However, there are a few entries that I don't want them to be able to freely enter as text. I want there to be a dropdown menu that they can pick the correct option, fill out the rest of the text boxes, then hit submit and have it store the info.
I have a table like this:
Table: Member_Rank
|RankID | Rank|
|0 | Name|
|1 | Name|
|... ... |
|n | Name|
It contains the basic info for what each RankID means.
I also a have another table with info about a member, this is where the info is sent to from the form i created. It has a bunch of attributes:
Table: Member_Info
Last Name
First Name
Email
...etc
RankID
What I want to be able to do is have them be able to see the n different rank names in the dropdown menu (populated by the Member_Rank table) when they are filling out the form so they can select one (this doesnt trigger an action). Then, after all of the text is filled out as well (i have checks working to make sure the necessary info is there before continuing), they hit submit and
the info supplied is stored in the Member_Info table.
I am using php and mysql. What I can't figure out though is 1) how to make a dropdown menu and 2) how to store the corresponding RankID (integer) into the Member_Info table based on what they had selected.
Any help would be much appreciated