-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex2.php
128 lines (88 loc) · 2.39 KB
/
index2.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
121
122
123
124
125
126
127
128
<?php
$dbserverName = "localhost";
$dbuserName = "root";
$dbpassword = "";
$dbname = "donation";
$conn = mysqli_connect( $dbserverName , $dbuserName , $dbpassword , $dbname );
include 'header.php';
$sql="Select * FROM reciever";
$records=mysqli_query($conn ,$sql);
?>
<section class="main-container">
<div class="main-wrapper">
<h2>Receiver's User Info</h2>
<?php
if (isset($_SESSION['Rec_UserName'])) {
echo "you are logged in as Receiver!";
echo "<table>";
//echo "<caption><B>Reciever List</B></caption>";
echo"<tr>";
echo"<th>Receiver ID</th>";
echo"<th>User ID</th>";
echo"<th>Receiver Name</th>";
echo"<th>Receiver User Name</th>";
echo"<th>Receiver Phone</th>";
echo"<th>Receiver street</th>";
echo"<th>Receiver Area</th>";
echo"<th>Need For</th>";
echo"<th>Receiver Catagory</th>";
echo"<th>Received Amount</th>";
echo"<th>Bank Account</th>";
echo"</tr>";
while($reciever=mysqli_fetch_assoc($records))
{
if(($reciever['Rec_UserName'])== ($_SESSION['Rec_UserName']))
{
echo "<tr>";
echo "<td>".$reciever['Rec_ID']."</td>";
echo "<td>".$reciever['User_ID']."</td>";
echo "<td>".$reciever['FullName']."</td>";
echo "<td>".$reciever['Rec_UserName']."</td>";
echo "<td>".$reciever['Phone']."</td>";
echo "<td>".$reciever['Street']."</td>";
echo "<td>".$reciever['Area']."</td>";
echo "<td>".$reciever['Reciever_type']."</td>";
echo "<td>".$reciever['r_catagory']."</td>";
echo "<td>".$reciever['Received_amount']."</td>";
echo "<td>".$reciever['Rec_Bankacc']."</td>";
echo "</tr";
echo"<br>";
$rcid = $reciever['Rec_ID'];
}
}
echo "</table>";
}
?>
<h2>Received History</h2>
<?php
$sql="Select * FROM donatesto where re_id='$rcid'";
$records=mysqli_query($conn ,$sql);
echo "</table>";
echo "<br>";
echo "<br>";
echo "<table>";
echo"<tr>";
echo"<th>serial</th>";
echo"<th>d_user</th>";
echo"<th>re_id</th>";
echo"<th>Amount</th>";
echo"</tr>";
while($donatesto=mysqli_fetch_assoc($records))
{
echo "<tr>";
echo "<td>".$donatesto['serial']."</td>";
echo "<td>".$donatesto['d_user']."</td>";
echo "<td>".$donatesto['re_id']."</td>";
echo "<td>".$donatesto['Amount']."</td>";
echo "</tr";
echo"<br>";
}
echo "</table>";
?>
</div>
<body>
</body>
</section>
<?php
include 'footer.php';
?>