ere in this question how can i check room availability just clicking the button

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Here in this question how can i check room availability just clicking the button. I already created php and mysql database but here how can check availability from database record

Context:
You have been hired by a hotel to develop an online web system to enable their customers to make
online bookings. At this stage, you are building a prototype; therefore, you do not need to implement
the full functionalities of the website. Your tasks include 1) the development of a website for the hotel
to advertise different types of rooms; 2) to develop a booking system for customers to make online
bookings. The task specifications are provided below.
Task 1:
Develop a simple website to advertise a range of rooms of the hotel. Your website should have the
basic structure of a professional hotel website, such as be a header menu, a main section of
The specific
advertisement, and a footer (e.g., https://www.primushotelsydney.com/accommodation).
requirements of your main section of advertisement are listed as below:
●
You need to advertise six types of rooms for this hotel: standard twin, executive twin, superior
suite, deluxe suite, executive suite, and presidential suite;
In the advertisement of each type of room, you need to list room information including bed
type, room size, room facilities, price per night and other information you view valuable;
You need to place two buttons besides each of your advertisement.
O
O
One button should be named as "check availability"? Upon clicking on it, customers
should be able to view the availability of the room in August 2022.
Assume this hotel has 2 rooms of each type.
You need to use PHP and MySQL to support this functionality.
Another button should be named as "book now". Upon clicking on it, customers will
be directed to a new webpage to make an online booking.
.
Transcribed Image Text:Context: You have been hired by a hotel to develop an online web system to enable their customers to make online bookings. At this stage, you are building a prototype; therefore, you do not need to implement the full functionalities of the website. Your tasks include 1) the development of a website for the hotel to advertise different types of rooms; 2) to develop a booking system for customers to make online bookings. The task specifications are provided below. Task 1: Develop a simple website to advertise a range of rooms of the hotel. Your website should have the basic structure of a professional hotel website, such as be a header menu, a main section of The specific advertisement, and a footer (e.g., https://www.primushotelsydney.com/accommodation). requirements of your main section of advertisement are listed as below: ● You need to advertise six types of rooms for this hotel: standard twin, executive twin, superior suite, deluxe suite, executive suite, and presidential suite; In the advertisement of each type of room, you need to list room information including bed type, room size, room facilities, price per night and other information you view valuable; You need to place two buttons besides each of your advertisement. O O One button should be named as "check availability"? Upon clicking on it, customers should be able to view the availability of the room in August 2022. Assume this hotel has 2 rooms of each type. You need to use PHP and MySQL to support this functionality. Another button should be named as "book now". Upon clicking on it, customers will be directed to a new webpage to make an online booking. .
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

There are no room no. here I had already design database with field customer name, email address, phone number , check-in date, room type , number of check in person.

Here there are six type of room and each type of room have 2 room.

this case should be relevant to task 2 given in this question

Task 2:
The booking webpage asks customers to fill in a booking form that collects a series of customer
information including customer name, email address, phone number, check-in date (suppose all
customers only book night), room type and number of check-in persons. Before you submit the data to
the server, you need to use JavaScript to check the validity of the input information. The specific
requirements are listed as below:
• A valid consumer name should have both first name and last name, and they should be
separated by a space (e.g., "
• A valid email address should have the "@" character;
A valid phone number should contain 10 digits and should start with "04";
Check-in date should be collected with a calendar date format;
Number of check-in persons should be less than or equal to the maximum number that a type
of room can accommodate.
o
Standard twin room and executive twin room can accommodate at most 2 persons;
o Superior suite room, deluxe suite room, and executive suite room can accommodate
at most 3 persons;
.
o Presidential suite can accommodate at most 5 persons;
If any data is invalid, you need to prevent the data from being sent to the server and ask customers to
re-enter the data. Please note that you MUST use JavaScript to check the validity of form input.
After the validity check, the form input will be sent to the server. You need to use PHP to connect to a
pre-created database named "SOF102_A1", and check whether there is a capacity for the nominated
room for the check-in date.
If there is still capacity, you need to store the registration information in the database. Then,
display "The below booking has been successful!" and display the booking details following.
Otherwise, display "Sorry! There is no available room!" and ask customers to re-enter new
booking information.
Transcribed Image Text:Task 2: The booking webpage asks customers to fill in a booking form that collects a series of customer information including customer name, email address, phone number, check-in date (suppose all customers only book night), room type and number of check-in persons. Before you submit the data to the server, you need to use JavaScript to check the validity of the input information. The specific requirements are listed as below: • A valid consumer name should have both first name and last name, and they should be separated by a space (e.g., " • A valid email address should have the "@" character; A valid phone number should contain 10 digits and should start with "04"; Check-in date should be collected with a calendar date format; Number of check-in persons should be less than or equal to the maximum number that a type of room can accommodate. o Standard twin room and executive twin room can accommodate at most 2 persons; o Superior suite room, deluxe suite room, and executive suite room can accommodate at most 3 persons; . o Presidential suite can accommodate at most 5 persons; If any data is invalid, you need to prevent the data from being sent to the server and ask customers to re-enter the data. Please note that you MUST use JavaScript to check the validity of form input. After the validity check, the form input will be sent to the server. You need to use PHP to connect to a pre-created database named "SOF102_A1", and check whether there is a capacity for the nominated room for the check-in date. If there is still capacity, you need to store the registration information in the database. Then, display "The below booking has been successful!" and display the booking details following. Otherwise, display "Sorry! There is no available room!" and ask customers to re-enter new booking information.
Solution
Bartleby Expert
SEE SOLUTION
Follow-up Question

there 2 rooms of each type. how can you do this same using php. we can only use php and mysql

Solution
Bartleby Expert
SEE SOLUTION
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY