Look here when Chapter 10 of the book mentions something extra to be found on the web site.
CGI Library:
Here are the
database versions of the toolkit functions developed in Chapter 10 (
read_state_db,
write_state_db, etc.). This file is not formatted as an external function library. You will need to copy them into your existing CGI function library or directly into your programs. Note that this file is also supplied for download with the source code archives.