Chapter 6 Lab
Updating Database Records from Forms
The CGI script for this lab:
- Reads information to update a book's price
HTML form
- Checks that the updated information is reasonable.
- Connects to the Nile database.
- Performs an UPDATE to the title table with the new information.
Tasks to Do for this Lab
- Modify the CGI script to add the proper SQL for the UPDATE statement.
Solution
Extra for Experts
Modify the HTML form so that:
- Only the title_id is entered initially
(solution source code)
- The CGI script returns another form showing the old information
and the fields for the updated information
(solution source code)
Run this from a form.
Dan Keller Technical Services © 2000