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
Source code
Run it from a form
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
.
[ ] [
Course Contents
] [
Home
] [
Curriculum
]
http://www.keller.com/dbweb/6/lab.html
Updated
Wednesday, 31-Oct-2001 14:17:46 CST
Copyright © 2006
Dan Keller Technical Services
4500 19th St., San Francisco
California, USA 94114
tel: 415 / 861-4500