<!DOCTYPE html>
<html>
<head>
<title>Tiger-Gen</title>
<!-- Compiled and minified CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-rc.2/css/materialize.min.css">
<!-- Compiled and minified JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-rc.2/js/materialize.min.js"></script>
<link href="https://fonts.googleapis.com/css?family=Raleway" rel="stylesheet">
<link rel="stylesheet" href="main.css">
</head>
<body>
<style>
.font1 {
font-family: 'Raleway', sans-serif;
}
</style>
<div class=" container center-align font1 y">
<h1 class="yeet big">Tiger-Gen</h1>
<?php
include ("connection.php");
$sql= "SELECT account FROM accs";
$result = mysqli_query($conn, $sql);
if (mysqli_num_rows($result) > 0) {
//output account
while($row = mysqli_fetch_assoc($result)) {
echo $row["account"];
}
} else {
echo "nothing";
}
mysqli_close($conn);
?>
<a class="waves-effect waves-light btn center-align btn-large">Generate</a>
</div>
</body>
</html>
Here is my html and php code, I have read over it many and many times and changed my php code multiple times. As you can see it outputs "Nothing" when nothing is in the database. But the problem is there are things in the database, any help is appreciated.
Here is my html and php code, I have read over it many and many times and changed my php code multiple times. As you can see it outputs "Nothing" when nothing is in the database. But the problem is there are things in the database, any help is appreciated.
Database: https://i.stack.imgur.com/qc1v4.png
Account table: here