I have a mysql database in which I am administering via phpMyAdmin.
I can run INSERT
and CREATE
just fine with php, but cannot SELECT
data from my database.
However, when I SELECT
inside of phpMyAdmin it works just fine.
I get no errors, but the browser outputs a status of:
500 (Internal Server Error)
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT * FROM test";
$result = $conn->query($sql);
echo mysql_error(); die;
echo "$result";
$conn->close();