Welcome Guest, Not a member yet? Register   Sign In
How To Get Departments Based on Course
#1

[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">
&lt;?php echo form_label('Courses','course'); ?&gt;</td>
<td width="33"> <strong>:</strong> </td>
<td width="431" colspan="2">&lt;?php
$course = $this->db->query("select * from courses");
foreach($course->result() as $courses)
{
$coursenames[]= $courses->course_name;
}

echo form_dropdown('Courses', $coursenames, 'course');?&gt; </td>
</tr>

<tr class="fieldbox">
<td width="311" align="right" height="23">&lt;?php echo form_label('Department','dept'); ?&gt; </td>
<td width="33"> <strong>:</strong> </td>
<td width="431" colspan="2">&lt;?php
$dept = $this->db->query("select * from departments");
foreach($dept->result() as $depts)
{
$ddata[]= $depts->dept_name;
}

echo form_dropdown('departments', $ddata, 'dept');?&gt; </td>
</tr>


Messages In This Thread
How To Get Departments Based on Course - by El Forum - 02-17-2012, 01:17 AM
How To Get Departments Based on Course - by El Forum - 02-17-2012, 01:39 AM
How To Get Departments Based on Course - by El Forum - 02-17-2012, 01:59 AM
How To Get Departments Based on Course - by El Forum - 02-17-2012, 04:58 AM
How To Get Departments Based on Course - by El Forum - 02-17-2012, 06:03 AM
How To Get Departments Based on Course - by El Forum - 02-19-2012, 10:08 PM
How To Get Departments Based on Course - by El Forum - 02-20-2012, 12:09 AM



Theme © iAndrew 2016 - Forum software by © MyBB