Connect wepage to php and store data if room available otherwise shows message,.....( I just want answer of red circle part...)
Connect wepage to php and store data if room available otherwise shows message,.....( I just want answer of red circle part...)
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...
Related questions
Question
Connect wepage to php and store data if room available otherwise shows message,.....( I just want answer of red circle part...)

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.
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps

Recommended textbooks for you

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 Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

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 Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

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
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education

Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY