Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 4 - PHP (20 Marks) The scenario given below shows how a user can write comments and give ratings on the hotels that they

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Question 4 - PHP (20 Marks) The scenario given below shows how a user can write comments and give ratings on the hotels that they have stayed in. Table : Hotel Hotel ID Hotel_Name Hotel Star H1 Hotel Continental Penan H2 Sunway Hotel Georgetown H3 Royal Hotel H4 Hotel Central Seaview Table: Feedback Feedback ID Feedback Date Feedback Customer Feedback Ratt Feedback Comment 2017-05-16 2017-07-11 aes 2017-10-30Mary Anne 2017-10-30 Cathy 2017-10-30 Ahmad Quite good for the price. OK..but the toilet was sme Wasted my money Fantasticl Value for This hotel is bad Hotel ID H2 H2 H4 H2 H4 Hotel Star Average Rating Hotel Naine Comments aud Rallogs Give Feedback Hotel Continental PenangNo Comment or Ratings Foand Sunway Hotel Georgetown2017-071James-OK .but the toilet was smelly.-3.0 Royol Hotel Hotel Ceutral Seaview 3 017-05-16-Ali-Quite good for the price 3.0 017-10-30-Cothy-Fantastie Vahue for money. 5.0 No Cornuet orRatings Found 2017-10-30.-Mary Anne.. Wasted my ouey .7 ve Comments and Rating .0ive Comments and Rotins 1.5Give Conmentsand Rating 4 1.0 2017-10-30 AhnadThis hotel is bad!-2.0 Feedback_Date, Feedback_Customer, Feedback Comment and Feedback_Rating (b) Based on question (a), write the codes for the give_comment.php page. [7 marks] The page should display the hotel that is currently selected to be given comments and rating. (This is identified from the view.php page.) . A form is provided which uses the post method. The form elements are named as feedback_customer, feedback_comment and feedback rating. The button name is sendbtn. Insert the user's data into the feedback table and redirect the user to the view.php page to see the changes. -) C | localhost/exam_1720/give-comment.php?hid.H3 ti App Cam MMLSEGEMS Portal MP3.direct - Music SeD Book Com Hotel ID H3 Hotel Name : Royal Hotel Hotel Star : 4 Name Berry White Feedback: We had a wonderful stayl Rating : [4 MP3.direct Music S The name of the text box is feedback_customer. The name of the text box is The name of the drop downJeedback ccomment Send Feedbackbox is feedback rating, Hotel Star Average Ratiog Hotel Name Comments aud Ratings Gire Feedback lotel Coatinental Penang Comment or Ratings Foond 17-05-16-Ali-Quite good for the price.-3.0 7-07-11James. OK.but the toilet was smelly. -3.0 y Hotel Georgetown 017-10-30-Cathy-Faotastic! Value for money.-5.0 l Hotel 18-02-02-Bery White-We had a wonderful stay!-4.0 4.0 7-10-30.-Mary AnneWasted my money-1.0 7-10-30-Ahmad This hotel is bad!-2.0 Ceotral Seaview

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions