Current File : /home/inlingua/public_html/dwarka/icentex/admin_fd/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';
$sqlQuery = "SELECT distinct courseId FROM ".$table." where language='".$language."' AND level ='".$levelid."' order by createDate desc ";
//echo $sqlQuery;
$result=mysqli_query($conn,$sqlQuery) or die();
$echovalue ="<select name='courseid'>";
while($row=mysqli_fetch_object($result))
{
$echovalue .="<option value='".$row->courseId."'>".$row->courseId."</option>";
}
$echovalue .="</select>";
echo $echovalue;
?>