$link = mysqli_connect("localhost", "username", "password");
if(!$link) {
trigger_error("Could not connect to the database", E_USER_ERROR);
}
mysqli_select_db($link, "myDatabase");
$result = mysqli_query("SELECT first, last FROM members");
if(!$result) {
trigger_error("Could not perform the specified query", E_USER_ERROR);
}
echo "First Name Last Name ";
while($row = mysqli_fetch_array($result)) {
echo "";
echo "{$row['first']} {$row['last']} ";
echo " ";
}
echo "
;
mysqli_close($link);
?>