I've been attempting to echo a mysqli query that selects all the data in the table from a specific field yet currently my code will not print anything on the screen, I also receive no indication of any error from within the console :/
<?php
$servername = "localhost";
$username = "username";
$password = "password";
$dbname = "database";
$conn = mysqli_connect($servername, $username, $password, $dbname);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$result = mysqli_query($conn, "SELECT field_name, FROM table_name");
print_r($result);
?>
I have already previously attempted to echo $result
rather than print_r
yet neither work so I'm not entirely sure what's wrong. Its my first time using phpMyAdmin :/