Delete Hotel
<<Back to Main Menu
Description:
Allows the manager to delete a hotel
Accessible by:
Managers
Accessed from:
View Hotels
Itself
Input parameters:
Hotel ID
areYouSure
Output
Delete Hotel Form or
Error or success message if the form has been submitted
Pseudo Code:
get/create session
if ('usertype' param in session == 'm') {
get parameters from the form
if (areYouSure == 'no') {
get hotel data from the database
display hotel information (name, url, city)
display Delete Hotel Form
}
else {
delete the hotel from the DB
display success message
}
}
else {
error message to say user must be logged in and be a manager
}