Question: 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

 4. Consider the form named index.php that allows users to choose

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!