Assign Guest To Activity

Function Number: 7

Function Name: Assign Guest To Activity

Link to Function Implementation

Function Type: Insertion

Description: This function accepts the following inputs: Guest ID, Activity Name, Scheduled On (DateTime), and Status, which are used to create new records within the 'assign_activities' table.

Primary Users: Resort staff responsible for creating or managing reservations and guest activities.

Tables Affected: assign_activities

Sample Input: Guest ID = 1, Activity Name = 'Archery', Schedule On = 04/09/2021 10:18 AM, Status = 'Scheduled'

Sample Output: A table displays all guest activities that Guest ID 1 has been assigned to.

Notes: This function consists of one insert query. All parameters passed to the web form (Guest ID, Activity Name, Schedule On, and Status) are mandatory and if they are not submitted a message is displayed informing the user that these fields are required (using mysqli_num_rows()). Error checking is provided such that if an error occurs, the error message will be echoed out to the user in the format "ERROR: $error_specific_message." A second query is then performed to retrieve all activities for the Guest ID passed to the function; these results will be displayed in a table.

Main Menu