function test_retrieve_RMHStaffLastName_RoomReservationActivity($rmhStaffLastName)
{
    $reservations = retrieve_RMHStaffLastName_RoomReservationActivity($rmhStaffLastName);
    if ($reservations == false) {
        echo "</br>" . "No Reservations were Found." . "</br></br></br>";
    } else {
        echo "</br>" . "Records Found:" . "</br>";
        foreach ($reservations as $reservation) {
            display_reservation($reservation);
        }
    }
}
function searchForReservations()
{
    $type = $_POST['searchType'];
    if ($type == "Select Search Type") {
        echo "Please choose what you're searching for from the drop down menu below.";
    } else {
        if ($type == "Request ID") {
            $roomReservationRequestId = $_POST["searchParam"];
            error_log("searching  by request id = " . $roomReservationRequestId);
            $Reservation = retrieve_RoomReservationActivity_byRequestId($roomReservationRequestId);
            // retrieval routine returns just one reservation, so return an array consisting of one record
            if (!$Reservation) {
                error_log("retrieve_RoomReservationActivity_byRequestID returned false");
                $Reservations = false;
            } else {
                $Reservations = array();
                $Reservations[] = $Reservation;
            }
            return $Reservations;
            /*   if (!$Reservations) {
                     echo ("No reservations found! Try entering your search again.");
                 } */
        } else {
            if ($type == "Social Worker (Last Name)") {
                $socialWorkerLastName = $_POST["searchParam"];
                //  $Reservations = array();
                $Reservations = retrieve_SocialWorkerLastName_RoomReservationActivity($socialWorkerLastName);
                return $Reservations;
                /*   if (!$Reservations) {
                         echo ("No reservations found! Try entering your search again.");
                     } */
            } else {
                if ($type == "Staff Approver (Last Name)") {
                    $rmhStaffLastName = $_POST["searchParam"];
                    //   $Reservations = array();
                    $Reservations = retrieve_RMHStaffLastName_RoomReservationActivity($rmhStaffLastName);
                    return $Reservations;
                    /*   if (!$Reservations) {
                             echo ("No reservations found! Try entering your search again.");
                         } */
                } else {
                    if ($type == "Family (Last Name)") {
                        $parentLastName = $_POST["searchParam"];
                        $Reservations = retrieve_FamilyLastName_RoomReservationActivity($parentLastName);
                        return $Reservations;
                    } else {
                        if ($type == "Status") {
                            $status = $_POST["searchParam"];
                            $Reservations = retrieve_RoomReservationActivity_byStatus($status);
                            return $Reservations;
                        } else {
                            if ($type == "Last Activity") {
                                $activity = $_POST["searchParam"];
                                $Reservations = retrieve_RoomReservationActivity_byLastActivity($activity);
                                return $Reservations;
                            }
                        }
                    }
                }
            }
        }
    }
}