-
Notifications
You must be signed in to change notification settings - Fork 1
/
Listsub.php
64 lines (51 loc) · 1.05 KB
/
Listsub.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
//session_start();
//echo '<h1>ALL is well Marks is Show</h1>';
$USN=$_SESSION['USN'];
?>
<!DOCTYPE html>
<html>
<head>
<title>Marks Sheet</title>
</head>
<?php
include 'connecting.php';
$sql = "select * from semsub where USN='$USN' GROUP BY sem,sub;";
$result = mysqli_query($conn, $sql);
echo 'Total Sub enrolled is :'.mysqli_num_rows($result);
$Nrows=mysqli_num_rows($result);
$error=mysqli_error($conn);
if($Nrows)
{
$i=0;
$table='<center><table><tr><th>sem</th><th>Subject</th></tr>';
while ($i!=$Nrows)
{
$row=mysqli_fetch_assoc($result);
$table.='<tr><td>'.$row['sem'].'</td>';
$table.='<td>'.$row['sub'].'</td></tr>';
$i=$i+1;
}
$table.='</table></center>';
echo $table;
}
else
{
echo "Marks Still Not Updated".$error;
}
?>
</body>
<style type="text/css">
table,tr,th{
border: 3px solid;
}
th{
border: 2px solid;
}
td{
border: 1px solid;
}
</style>
<script type="text/javascript">
</script>
</html>