I want my table centered so I tried this: <table align=center>HEEHHE</table>
which doesn't work.
My code:
<?php
$servername = "***:3306";
$username = "**";
$password = "!!!!";
$dbname = "***";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT balance FROM tbl_users WHERE userID = 8";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
echo "<table align="center"><tr><th>Aktuell im Jackpot:</tr></th>";
// output data of each row
while($row = $result->fetch_assoc()) {
echo "<tr><td>".$row["balance"]."</tr></td>";
}
echo "</table>";
} else {
echo "0 results";
}
$conn->close();
?>