-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpractice.php
More file actions
22 lines (16 loc) · 799 Bytes
/
Copy pathpractice.php
File metadata and controls
22 lines (16 loc) · 799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
inclue("myCredentials.php");
$con = mysqli_connect($servername, $username, $password, $dbname);
if(!$con) {
die("Connection Failed: " . mysqli_connect_error());
}
$query = "SELECT uname, message FROM message";
$result = mysqli_query($con, $query);
while($row = $result->fetch_array()) {
echo "<tr>";
echo "<td>" . $row['uname'] . "</td>";
echo "<td>" . $row['message'] . "</td>";
echo "</tr>";
}
mysqli_close($con);
?>