Created
April 17, 2017 22:58
-
-
Save jorgeguberte/e0ffc27ebcfe7b1cd227a6170cee5839 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$sql = "SELECT id, firstname, lastname FROM MyGuests"; | |
$result = mysqli_query($conn, $sql); | |
if (mysqli_num_rows($result) > 0) { | |
// output data of each row | |
while($row = mysqli_fetch_assoc($result)) { | |
echo '<pre>'; | |
print_r($row); | |
echo '</pre>'; | |
} | |
} else { | |
echo "0 results"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment