This is the student who have a subject of National Service Training Program 1 and Physical Education 1 here is the code and picture
select en.*, su.descc from enrollment en inner join subject su on su.year = en.year
after that when the student logged in it only shows National Service Training Program 1 subject, how to display also the Physical Education 1?
This is the result when the student logged in
<?php
session_start();
include_once("config.php");
if(!isset($_SESSION['sid'])){
header("Location:index.php");
}
// Subject
$i=$_SESSION['sid'];
$q=mysqli_query($mysqli,"SELECT en.*, su.descc FROM enrollment en INNER JOIN subject su ON
su.year = en.year
WHERE id='$i'") or die (mysqli_error());
$r=mysqli_fetch_array($q);
?>
<html>
<body>
<h2> Subject: <?php echo $r['descc'];?> </h2>
<h2> Subject: <?php echo $r['descc'];?> </h2>
</body>
</html>
EXPECTED OUTPUT This would be the Expected output when the student logged in Expected Output