Your IP : 216.73.216.40


Current Path : /var/www/html/kpsingh/kpsingh/
Upload File :
Current File : /var/www/html/kpsingh/kpsingh/teaching.php

<link rel = "stylesheet" type="text/css" href="css/teaching.css">

<?php
	include 'template.php';
	include 'db.php';
	$sql = "SELECT DISTINCT year FROM courses ORDER BY year DESC";
	$result = mysqli_query($dbconn, $sql);
	
	while($obj = mysqli_fetch_object($result)){
		$year = $obj->year;
		$sql2 = "SELECT DISTINCT sem FROM courses WHERE year = '$year' ORDER BY sem ASC";
		$result2 = mysqli_query($dbconn, $sql2);

		while($obj2 = mysqli_fetch_object($result2)){
			$sem = $obj2->sem;

?>

<div id = "res">
	<b><?php echo $year; echo " "; echo strtoupper($sem); echo " " ;echo "Semester:";  ?></b>
	<br><br>
	<?php
		$sql1 = "SELECT link, coursename FROM courses WHERE year='$year' AND sem='$sem'";
		$result1 = mysqli_query($dbconn, $sql1);
		
		while($obj1 = mysqli_fetch_object($result1)){
			$link = $obj1->link;
			$coursename = $obj1->coursename;
	?>
	<a id = "link" href = '<?php echo $link ?>'><?php echo $coursename; ?></a>
	<br><br>
	<?php }; ?>
</div>

<?php
	};
	};
?>