Create New Reservation

Function Number: 2

Function Name: Create New Reservation

Link to Function Implementation

Function Type: Insert (3 tables affected)

Description: This function accepts as input clearly labelled fields describing a guest's booking and reservation. The function uses this information to insert new records into affected tables. If entries already exist under the provided primary keys, those entries will be updated to contain new information.

Primary Users: Resort staff responsible for creating or managing reservations

Tables Affected: guests, reservation, booking

Sample Input

Sample Output: Informs users that tables have been updated and displays the specific entries having just been inserted into each of the affected tables.

Notes: This function receives 20 form variables and inserts them into their appropriate position within three seperate tables. It utilizes the 'REPLACE INTO' command as opposed to 'INSERT INTO' to avoid duplicate records. The PHP implementation checks to ensure that required fields are not empty. If they are, a message is echoed.

Main Menu