prepare($sql); if ($urgency !== "") { $stmt->bind_param("ss", $blood_type, "%$urgency%"); } else { $stmt->bind_param("s", $blood_type); } $stmt->execute(); $result = $stmt->get_result(); } ?>