echo $row;
you're missing the column's object's array itself that you want to echo.
What you want is echo $row[0];
However, both column and table name are the same, so make sure that that is indeed correct.
As per the manual:
Example pulled from the manual:
$query = "SELECT Name, CountryCode FROM City ORDER by ID DESC LIMIT 50,5";
if ($result = mysqli_query($link, $query)) {
/* fetch associative array */
while ($row = mysqli_fetch_row($result)) {
printf ("%s (%s)
", $row[0], $row[1]);
}
/* free result set */
mysqli_free_result($result);
}
If the above failed, then that could mean that your query may have failed and you need to check for errors on the query, using mysqli_error($conn)
.
Reference:
Same thing goes for the connection.
Reference:
Example from the manual:
<?php
$link = mysqli_connect("127.0.0.1", "my_user", "my_password", "my_db");
if (!$link) {
echo "Error: Unable to connect to MySQL." . PHP_EOL;
echo "Debugging errno: " . mysqli_connect_errno() . PHP_EOL;
echo "Debugging error: " . mysqli_connect_error() . PHP_EOL;
exit;
}
echo "Success: A proper connection to MySQL was made! The my_db database is great." . PHP_EOL;
echo "Host information: " . mysqli_get_host_info($link) . PHP_EOL;
mysqli_close($link);
?>