[eluser]prakash[/eluser]
Hi iam using ci form tags to design a form.....
Here i want to get departments based on the course selected so how to move on
Here is my code
---------------------------------------
<tr class="fieldbox">
<td width="311" align="right" height="23">
<?php echo form_label('Courses','course'); ?></td>
<td width="33"> <strong>:</strong> </td>
<td width="431" colspan="2"><?php
$course = $this->db->query("select * from courses");
foreach($course->result() as $courses)
{
$coursenames[]= $courses->course_name;
}
echo form_dropdown('Courses', $coursenames, 'course');?> </td>
</tr>
<tr class="fieldbox">
<td width="311" align="right" height="23"><?php echo form_label('Department','dept'); ?> </td>
<td width="33"> <strong>:</strong> </td>
<td width="431" colspan="2"><?php
$dept = $this->db->query("select * from departments");
foreach($dept->result() as $depts)
{
$ddata[]= $depts->dept_name;
}
echo form_dropdown('departments', $ddata, 'dept');?> </td>
</tr>