Trying to get all the users from my database, yet when I do so, the query fails.
Attempting to do so with
$userNames = mysqli_query($con, "SELECT * FROM Login");
Where in PHPMyAdmin the database has a few records in the table login. I checked if the connection is connected, its connected.
Is there any reason this wouldn't work?
Here is a examplepage, you can try logging in with Username and Password.
EDIT: From the example page, here is the code used to test:
if (mysqli_connect_errno($con)) {
echo "Failed to connect to MySQL: " . mysqli_connect_error() . "<br />";
} else {
echo "Connected to MySQL!<br />";
}
if(mysqli_query($con, "SELECT * FROM Login")){
echo "Query good!<br />";
} else {
echo "Query bad!<br />";
}
EDIT 2: Here is a screenshot of the table existing, and the data existing: