The code below is used to retrieve some simple data from a MySQL table named people's names.
<?php
$user = "root"; //Connection to DB
$pass = "";
$db = "testdb";
$link = new mysqli('localhost' , $user , $pass, $db) or die("unable to connect");
$query = "select * from people's names";
if ($result = mysqli_query($link, $query)){
echo "It Worked!";
} else {
echo "it failed!";
}
?>
I checked the code over and over again and have searched every corner of the internet to find an answer but can't seem to prevent the inevitable "it failed!" message when I load the page. Any help would be greatly appreciated. Thanks -Dylan.