-
Notifications
You must be signed in to change notification settings - Fork 0
/
db_table.php
127 lines (99 loc) · 3.41 KB
/
db_table.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
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script type="text/javascript" src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.22/css/dataTables.bootstrap4.min.css
">
</head>
<body>
<?php
$conn=mysqli_connect("localhost","root","","exicutive");
$sql="SELECT * FROM payment_details";
$result=mysqli_query($conn,$sql);
$total=mysqli_num_rows($result);
//echo $total;
?>
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<table id="example" class="table table-striped table-bordered" style="width:100%">
<thead>
<tr>
<th>Sr\No.</th>
<th>Amount</th>
<th>Name</th>
<th>Father/Husband Name</th>
<th>Email</th>
<th>Mobile_Number</th>
<th>Date</th>
<th>Blood_group</th>
<th>qualificaton</th>
<th>gender </th>
<th>village</th>
<th>post</th>
<th>PS</th>
<th>distict</th>
<th>state</th>
<th>pincode </th>
<th>adhar_number</th>
<th>pan_number</th>
<th>status</th>
<th>txn_id</th>
</tr>
<?php
$n=1;
while($res=mysqli_fetch_assoc($result))
{
echo "<tr>
<td>".$n++."</td>
<td>".$res['amount']."</td>
<td>".$res['name']."</td>
<td>".$res['father_name']."</td>
<td>".$res['email']."</td>
<td>".$res['mobile']."</td>
<td>".$res['date']."</td>
<td>".$res['blood_group']."</td>
<td>".$res['qualificaton']."</td>
<td>".$res['gender']."</td>
<td>".$res['village']."</td>
<td>".$res['post']."</td>
<td>".$res['ps']."</td>
<td>".$res['distict']."</td>
<td>".$res['state']."</td>
<td>".$res['pincode']."</td>
<td>".$res['adhar_number']."</td>
<td>".$res['pan_number']."</td>
<td>".$res['status']."</td>
<td>".$res['txn_id']."</td>
<td><a href='delete.php?id=$res[id]' onclick='return checkclick()'>Delete</a></td>
</tr>
";
}
//else
//{ echo "no result found";}
?>
</thead>
<tbody>
</tfoot>
</table>
<script>
function checkclick()
{
return confirm ("Are you sure you want to delete data? ");}
</script>
</div>
</div>
</div>
<script type="text/javascript">
$(document).ready(function() {
$('#example').DataTable();
} );
</script>
</body>
</html>