the syntax of that select query and how to check to see if any records match.
It depends on your database extension, but generally it would be along the lines of:
SELECT COUNT(*) FROM users WHERE first_name='$first_name' AND last_name='$last_name' LIMIT 1
For example, using the PDO extension:
$stmt = $db->prepare("SELECT COUNT(*) FROM users WHERE first_name=:first_name AND last_name=:last_name LIMIT 1");
$stmt->bindParam(':first_name', $first_name, PDO::PARAM_STR);
$stmt->bindParam(':last_name', $last_name, PDO::PARAM_STR);
$stmt->execute();
if ($stmt->fetchColumn() == 0) {
// No existing entry, so insert user entry.
} else {
// There is an existing entry, so inform user to try again.
}