-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcontent.php
49 lines (42 loc) · 1.18 KB
/
content.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
<?php
/**
* @author David Gold <[email protected]>
*
* @version 1.0
*
* @link http://opensc.cf
*
*/
?>
<?php
$hostname = "localhost";
$dbname = "blogdb";
$username = "blogcntroot";
$password = "2118312904444";
$conn = mysqli_connect("$hostname", "$username", "$password", "$dbname");
if (!$conn) {
die("$c_err");
}
$sql = "select * from blog order by Bid Desc";
if ($result = mysqli_query($conn, $sql)) {
if (mysqli_num_rows($result) > 0) {
echo "<table class='table table-striped table-responsive table-hover'>";
while ($row = mysqli_fetch_array($result)) {
echo "<tr>";
echo "<td><b>" . $row['BTitle'] . "</b></td>";
echo "</tr>";
echo "<tr>";
echo "<td>" . $row['BDesc'] . "</td>";
echo "</tr>";
echo "<tr>";
echo "<td><a href=" . $row['BUrl'] . " class='text-decoration-none'>Read More ...</a></td>";
echo "</tr>";
echo "<tr>";
echo "<td>Category - <b>" . $row['BCategory'] . "</b></td>";
echo "</tr>";
}
echo "</table>";
}
}
mysqli_close($conn);
?>