Description
Implement a simple RESTful web service using PHP.
Your web service will provide information about books.
http://localhost/bookswill give list of books (title, price, category) that are stored in your database.
http://localhost/books/idwill give all book details (title, year, price, category, authors) for given book id.
Results will be in JSONor XML format.
Database schema is as follows:
Book (Book_id, Title, Year, Price, Category)
Book_Authors (Book_id, Author_id)
Authors (Author_id, Author_Name)
You can use books.xml file to populate your database.
Important reminder: Make sure your database name (HW4), table name and attribute names match with given names. You also make sure to use default hostname, username and password for database connection. (host: localhost, username: root, password: root). Otherwise you will lose points for not complying with the standards of the assignment.
Deliverables:
Zip index.php file and screenshot of the results (for books and books/id)
into yournetid-HW4.zip and submit through eLearning.