Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $link = mysqli_connect("127.0.0.1", "dbadmin", "p9zzW@", "contacts");
- $query = "SELECT id, firstname, lastname, email FROM contacts ORDER BY lastname";
- $result = mysqli_query($link, $query);
- if ($result) {
- while ($row = mysqli_fetch_row($result)) {
- printf ("%s %s %s %s\n", $row[0], $row[1],
- $row[2], $row[3]);
- }
- /* free result set */
- mysqli_free_result($result);
- }
- /* close connection */
- mysqli_close($link);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement