It is redirected to the last else which echo "Function error" because the
if (isset ($_POST['booking_request_id']))
is false.
That means there is no post element of 'book_request_id' submitted from the form, check if there is any typo in the name of the corresponding html element (I guess it is an input type = "text" element) on the submitting form.