-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathviewSavings.php
94 lines (69 loc) · 2.46 KB
/
viewSavings.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
<?php
session_start();
$connect = mysqli_connect('localhost', 'root', '', 'moneyliteracy');
$parents_name = $_SESSION['parents_name'];
$id=$_GET['sid'];
$q="SELECT savings_id, savings_details, savings_date, savings_total from savings where students_id =$id";
$res=mysqli_query($connect, $q) or die("Can't Execute Query...");
$row = mysqli_fetch_assoc($res);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<!--- meta -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>View Student's Savings</title>
<!--- link -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link href="style.css" rel="stylesheet">
</head>
<body data-spy="scroll" data-target="#navbar" data-offset="300">
<!--- NAVIGATION -->
<?php include('header.php'); ?>
<!-- /.END-NAVIGATION -->
<div class="container" style = "margin-left: 300px; margin-right: 0px; width:100%;"><br>
<div class="post">
<div class="col-lg-8" style="text-align: justify;">
<div class="shadow p-3 mb-5 bg-white rounded">
<h1 class="title" style="text-align:center;">STUDENT SAVINGS</h1><br>
<div class="entry" align="center" width="80%">
<div class="box-body">
<table id="example1" class="table table-bordered table-striped">
<tr>
<thead>
</tr>
<tr>
<th style="color:black; text-align:center;" WIDTH="50px"><b>NO</b></th>
<th style="color:black; text-align:center;" WIDTH="150px"><b>ID</b></th>
<th style="color:black; text-align:center;" WIDTH="150px"><b>DETAILS</b></th>
<th style="color:black; text-align:center;" WIDTH="150px"><b>DATE/TIME</b></th>
<th style="color:black; text-align:center;" WIDTH="150px"><b>TOTAL</b></th>
</tr>
</thead>
<?php
$count=1;
while($row=mysqli_fetch_assoc($res))
{
echo '<tr>
<td style="text-align:center;">'.$count.'
<td style="text-align:center;">'.$row['savings_id'].'
<td style="text-align:center;">'.$row['savings_details'].'
<td style="text-align:center;">'.$row['savings_date'].'
<td style="text-align:center;">RM '.$row['savings_total'].'
</tr>';
$count++;
}
?>
</div>
</TABLE>
<br>
</div>
</div>
</div>
</div>
</div>
<!--- Footer -->
</body>
</html>