Hello all. I am making an interface in php that will draw data from a mysql database. What I have started doing is the html, this is what I know well. php is a different story though.
I have reached a point where I am looking at the various forms I have created and thinking about some of the drop down boxes and how the user will be able to enter the data accordingly. I have throughout the database a lot of independant tables. The purpose of these tables is to provide data to a drop down box so the user can choose the desired data. For example:
Now, in my html, I have different input and select tags for the data. Some will be entered into the input fields and some will be used from the drop down boxes. Such as:
In my examples above, I need the "district" to dictate the sector. In other words, a district has many sectors but a single sector belongs to only one district.
In order to force php to give the results of the coorasponding sectors, do I need to have dependant dropdown boxes? I hope I am making myself clear on this.
I figured I had better get some clairification now before I waste a lot of time coding something that may not even work.
Thanks.
I have reached a point where I am looking at the various forms I have created and thinking about some of the drop down boxes and how the user will be able to enter the data accordingly. I have throughout the database a lot of independant tables. The purpose of these tables is to provide data to a drop down box so the user can choose the desired data. For example:
Code:
[b]district_table [/b] district [b]sector_table[/b] district sector
Code:
<table> <tr> <td><select class="dated" style="width: 99%" name="sector"><option value="1" /><option value="2" /></select></td> </tr> <tr> <td><select class="dated" style="width: 99%" name="district"><option value="1" /><option value="2" /></select></td> </tr> </table>
In my examples above, I need the "district" to dictate the sector. In other words, a district has many sectors but a single sector belongs to only one district.
In order to force php to give the results of the coorasponding sectors, do I need to have dependant dropdown boxes? I hope I am making myself clear on this.
I figured I had better get some clairification now before I waste a lot of time coding something that may not even work.
Thanks.
Comment