HW03: Sanitize, Validate, Secure due Tue 06 Feb 13:20

\begin{purpose}
In completing this assignment you will:
\begin{itemize}
\ite...
...toward writing a working book-listing application.
\end{itemize}
\end{purpose}

Allowed and Disallowed Resources

In completing this assignment you MAY use/access the following resources:

You may NOT use/access:

Failure to abide by these guidelines will result in a zero for the assignment and the incident will be reported to the university provost as a violation of the university academic integrity policy. A second incident of academic dishonesty (whether from this course or another computer science course) will result in an F in the course.

Details

Begin by creating an error.php that we can use to handle errors. Have the page accept a query parameter named error that holds an error code. On the error page you can look at the code to determine the appropriate message. If a database connection attempt fails, redirect to this page and pass an error code of db_connect. The error page should translate the code into a meaningful message.

You will add a “Book Detail” page that will display the title, price, and condition of a book along with an update button and a delete button. The two buttons will not be functional for this assignment. To accomplish this you will make each book title on the home page a link that passes the book's database id number as a query parameter in the URL. The “Book Detail” page will extract the book id and look it up. If no matching book is found it should display an appropriate error message. If the book id is missing from the URL or the id is not valid you should redirect to error.php with an appropriate code / error message.

Also, the application as it sits now allows anything to be entered in the form and will attempt to save it to the database. We will address this by adding server-side santization, validation, and security fixes. Also, you will You need to modify your handling of form data as follows:

Some Suggestions