-
Notifications
You must be signed in to change notification settings - Fork 1
/
all.php
78 lines (70 loc) · 3.73 KB
/
all.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
<?php include("header.php");
include("config.php");
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT * from coins";
$result = $conn->query($sql);
?>
<!-- Page wrapper -->
<div class="page-wrapper">
<!-- End Bread crumb -->
<!-- Container fluid -->
<div class="container-fluid">
<!-- /# row -->
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body">
<div class="table-responsive m-t-8">
<table id="example23" class="display nowrap table table-hover table-striped table-bordered" cellspacing="0" width="100%">
<thead>
<tr>
<th style="display:none;">Id</th>
<th>Name</th>
<th>Coin</th>
<th>Price</th>
<th>Rank</th>
<th>1h %</th>
<th>24h %</th>
<th>7d %</th>
<th>Market Cap</th>
<th>Volume(24h)</th>
<th>Date Listed
</th>
</tr>
</thead>
<tbody>
<?php
while($row = $result->fetch_assoc()) {
?>
<tr>
<td style="display:none;"><?php echo $row['id'];?></td>
<td><?php echo $row['name'];?></td>
<td><?php echo $row['symbol'];?></td>
<td><?php echo $row['price'];?></td>
<td><?php echo $row['cmc_rank'];?></td>
<td><?php echo $row['percent_change_1h'];?></td>
<td><?php echo $row['percent_change_24h'];?></td>
<td><?php echo $row['percent_change_7d'];?></td>
<td><?php echo $row['market_cap'];?></td>
<td><?php echo $row['volume_24h'];?></td>
<td><?php echo $row['date_added'];?></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- End Container fluid -->
<?php include("footer.php");
?>