The following is the code I use to try and achieve this.
$con=mysqli_connect("localhost:8889","root","root","booksmart_properties");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
else{
echo "we connected";
}
// Perform queries
$sql=mysqli_query($con,"SELECT * FROM ListedProperties");
$result=mysqli_fetch_assoc($sql);
echo $result['*'];
mysqli_close($con);
?>
I'm new to php and i'm sure it's something small, I just can't see it.