$query = "SELECT * FROM `pets` WHERE `owner`='" . $_POST['ownername'] . "' AND species='" . $_POST['species'] . "'";
$query = sprintf("SELECT * FROM `pets` WHERE `owner`='%s' AND `species`='%s'", $_POST['ownername'], $_POST['species']);