Current File : /home/inlingua/public_html/noida/icentex_noida/admin_cert/course_ajax.php |
<?php
require('../dbConnection.php');
// Include common functions
require('../commonFunc.php');
// Include common functions
require('../globalVars.php');
// Include the table handler class
require('../dbHandler.class.php');
// Init and connect to database
$dbObject = new dbHandler();
$dbObject->connect();
$levelid=$_REQUEST['LID'];
$language=$_REQUEST['Lg'];
if($_REQUEST['LID']=='1A' || $_REQUEST['LID']=='1B') $table='level_1';
else if($_REQUEST['LID']=='2A' || $_REQUEST['LID']=='2B') $table='level_2';
else if($_REQUEST['LID']=='3A' || $_REQUEST['LID']=='3B') $table='level_3';
if($levelid=="All")
{
$sqlQuery = "SELECT distinct courseid FROM ingl_course order by startdate desc ";
}
else
{
$sqlQuery = "SELECT courseid,instructor FROM ingl_course where branch ='".$levelid."' order by startdate desc ";
}
//echo $sqlQuery;
$result=mysql_query($sqlQuery) or die();
$echovalue ="<select name='courseid'>";
while($row=mysql_fetch_object($result))
{
$queryN="select * from timesheet_user where recNo='".$row->instructor."'";
$resultN=mysql_query($queryN);
$numN=mysql_fetch_array($resultN);
$echovalue .="<option value='".$row->courseid."'>".$row->courseid."</option>";
}
$echovalue .="</select>";
echo $echovalue;
?>