-
Notifications
You must be signed in to change notification settings - Fork 0
/
feesdetail.php
61 lines (54 loc) · 1.51 KB
/
feesdetail.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
<?php
include './config/db.php';
$hid=$_POST['hid'];
$stdid = $_POST["stdid"];
if($hid!= "" && $stdid!="")
{
$sql="SELECT * FROM `fees` where Hostel_hid = $hid AND Standard_sid=$stdid";
$result = mysqli_query($conn,$sql);
?>
<table border="1">
<tr>
<th colspan="2">Fees Details</th>
</tr>
<?php
while($row = mysqli_fetch_array($result))
{
$sql1="select * from hostel where hid=$hid";
$res1=mysqli_query($conn,$sql1);
$fetch=mysqli_fetch_assoc($res1);
$sql2="select * from standard where sid=$stdid";
$res2=mysqli_query($conn,$sql2);
$fetch2=mysqli_fetch_assoc($res2);
echo '<tr>
<th colspan="2">'.$fetch['hname'].'</th>
</tr>
<tr>
<td>Standard</td>
<td>'.$fetch2['sname'].'</td>
</tr>
<tr>
<td>School Fees</td>
<td>'.$row['School_fees'].'</td>
</tr>
<tr>
<td>Hostel Fees</td>
<td>'.$row['Hostel_fees'].'</td>
</tr>
<tr>
<td>Other Fees</td>
<td>'.$row['Other_fees'].'</td>
</tr>
<tr>
<td>Total Fees</td>
<td>'.($row['Other_fees']+$row['Hostel_fees']+$row['School_fees']).'</td>
</tr>
';
}
echo '</table>';
}
else
{
echo '<p class="text-danger">Please select appropriate stadard and hostel </p>';
}
?>