I'm new here and would appreciate some guidance and advice. I'm working on my first phpadmin/mysql project and it's something that I'm doing in my spare time, so I don't exactly have all the time in the world for research. Here are my questions:
1) For simplicity's sake, let's say that I have 2 fields, one for state, one for city that appear on my website. I have 51 tables created in MySql, one titled "states" that contain every state, and 50 other titled by the state name, and the records are the cities in that particular state (i.e., there is a "Texas" table and it has all the Texas cities entered as records). When the end user comes to the field for "state", I want them to have a drop down menu from which they can select the state, and I want this menu to be populated by the records in the "state" table. Is that possible w/out having to use an HTML form?
2) So let's say that the user selects the state TX from the aforementioned drop down menu; when the user comes to the "city" field, I would like this drop down menu to be populated with ONLY the cities that correspond to the cities in that state.
How would I write the php code for each of these queries??
Thank you for your assistance.