Chapter 3
Handling Errors
Chapter Objectives
Identify and eliminate some problems inherent in CGI scripts.
Explain and use the
undef
value.
Topics
Problems with CGI scripts
Solutions to these problems
The value of undefined values
Lab
: A CGI script that:
Dumps the
title
table from the
test_nile
database, as in the previous chapter.
Uses
eval
:
Catch database errors
Instead of just dropping dead when they happen
Tests results with
defined()
:
Checks that real handles were returned
Instead of just dying if it tries to use one when there is none.
Summary
[ ] [
Course Contents
] [
Home
] [
Curriculum
]
http://www.keller.com/dbweb/3/index.html
Updated
Wednesday, 31-Oct-2001 14:17:45 CST
Copyright © 2006
Dan Keller Technical Services
4500 19th St., San Francisco
California, USA 94114
tel: 415 / 861-4500