Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4. Consider the form named index.php that allows users to choose the category of a book to buy and a maximum price limit. This form

image text in transcribed

4. Consider the form named index.php that allows users to choose the category of a book to buy and a maximum price limit. This form includes a drop-down list of the available book categories, a text box for the user to enter a maximum price of the book to search and a View Books button to submit the form to search.php. The form and the database table books should look like this: Book Search: id category_name price 1 drama romeo and Juliet 965 2 drama hamlet 1744 Book Category: Select a book category: Maximum Price: View Books 3 satire animal farm 253 4 horror dracula 2078 Your task is to write a PHP code for search.php that performs following operations based on user inputs in the form; i. If there is no book in the store which is less than the user specified price, then the message should be displayed to the user in the div next to the button. For example, if user selects book category of drama and enters a maximum price limit of 500 then the system should display the message; 'Sorry, there is no drama book below the price of Rs. 500'. (4 Marks) ii. If the search remains successful, the system should display list of books along with the price as an ordered list. For example, if the user has selected book category of drama and maximum price of 2000, then the system should display ordered list of books along with their prices and name as presented below: (4 Marks) Matching Books: 1. Rs.965 - romeo and juliet 2. Rs. 1744 - hamlet

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

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Solve for x: 2(3x 1)2(x + 5) = 12

Answered: 1 week ago