-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathviewDue (another copy).php
120 lines (93 loc) · 2.26 KB
/
viewDue (another copy).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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<?php session_start(); ?>
<!DOCTYPE HTML>
<html>
<head>
<title>View Dues</title>
<meta name="description" content="website description" />
<meta name="keywords" content="website keywords, website keywords" />
<meta http-equiv="content-type" content="text/html; charset=windows-1252" />
<link rel="stylesheet" type="text/css" href="style/style.css" />
</head>
<style type="text/css">
button{
width: 60%%;
background-color: #00C6F0;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
border-radius: 4px;
cursor: pointer;
}
button:hover{
background-color: #00bbe6;
}
table {
background-color: #00C6F0;
color: white;
width: 100%;
height: 100%;
}
</style>
<?php
include 'db.php';
include 'stuhead.php';
?>
<div id="content">
<?php
//$name = $_SESSION['name'];
//$email = $_SESSION['email'];
//$sql5 = "SELECT * FROM student WHERE name='$name' AND email='$email'";
//$result = $conn->query($sql5);
//$row = $result->fetch_assoc();
$rollno = $_SESSION['rollno'];
$sql = "SELECT * FROM dues WHERE rollno = '$rollno'";
$result = mysqli_query($con, $sql);
if (mysqli_num_rows($result) > 0) {
$i=0;
echo "<table>
<tr>
<th>Roll Number</th>
<th>Comp ID</th>
<th>Comp Name</th>
<th>Quantity</th>
<th>time</th>
</tr>
";
// output data of each row
while($row = mysqli_fetch_assoc($result)) {
$cid=$row['compId'];
$tim=$row['time'];
$roll=$row['rollno'];
$number=$row['number'];
$dID=$row['dID'];
$sql1 = "SELECT * FROM component WHERE compId = '$cid' LIMIT 1";
$result1 = mysqli_query($con, $sql1);
$row1 = mysqli_fetch_assoc($result1);
$name = $row1['name'];
echo "
<div id='movie_box$i' class='dashdiv'>";
echo "<tr>";
echo "<td>".$roll."</td>";
echo "<td>".$cid."</td>";
echo "<td>".$name."</td>";
echo "<td>".$number."</td>";
echo "<td>".$tim."</td>";
echo "</tr>";
$i++;
echo "</div>";
}
}
else {
echo "0 results";
}
mysqli_close($con);
?>
<script>
function selects()
{
document.getElementById("viewDue").className = "selected";
}
</script>
</body>
</html>