[eluser]masdevid[/eluser]
Hey all, I'm newbie using CI.
Here I don't know how to make chained <select> with latest CI. The select option is from database..
Here the database:
----------------------------------------
|
Table: University |
----------------------------------------
| id_univ | name_university |
----------------------------------------
| 1 | State University of Malang |
| 2 | Brawijaya University |
----------------------------------------
--------------------------------------------
|
Table: Department |
--------------------------------------------
| id_dep | name_department | id_univ |
--------------------------------------------
| 1 | Engineering | 1 |
| 2 | Education | 1 |
| 3 | Economics | 1 |
| 4 | Law | 2 |
| 5 | Psychology | 2 |
--------------------------------------------
Please help me, what i have to write in Controller, Models and Views.
In views, i prefer using table like this
Code:
<table>
<tr>
<td>University :</td>
<td><select name="university"><option>Select University</option></select></td>
</tr>
<tr>
<td>Department :</td>
<td><select name="department"><option>Select Department</option></select></td>
</tr>
</table>
Thanks before.