Cover
title | : | Sams Teach Yourself CGI in 24 Hours Sams Teach Yourself in 24 Hours |
author | : | Colburn, Richard. |
publisher | : | Pearson Education, Inc. |
isbn10 | asin | : | 0672318806 |
print isbn13 | : | 9780672318801 |
ebook isbn13 | : | 9780585385914 |
language | : | English |
subject | CGI (Computer network protocol) , Web servers--Computer programs. |
publication date | : | 2000 |
lcc | : | QA76.73.C65 2000eb |
ddc | : | 005.13 |
subject | : | CGI (Computer network protocol) , Web servers--Computer programs. |
Page i
Rafe Colburn
SAMS
Teach Yourself
CGI
in 24 Hours
A Division ofMacmillan USA
201 West 103rd St., Indianapolis, Indiana, 46290 USA
Page ii
Sams Teach Yourself CGI in 24 Hours
Copyright 2000 by Sams Publishing
All rights reserved. No part of this book shall be reproduced, stored in a retrieval system, or transmitted by any means, electronic, mechanical, photocopying, recording, or otherwise, without written permission from the publisher. No patent liability is assumed with respect to the use of the information contained herein. Although every precaution has been taken in the preparation of this book, the publisher and author assume no responsibility for errors or omissions. Nor is any liability assumed for damages resulting from the use of the information contained herein.
International Standard Book Number: 0-672-31880-6
Library of Congress Catalog Card Number: 99-69271
Printed in the United States of America
First Printing: June 2000
03 02 01 00 4 3 2 1
Trademarks
All terms mentioned in this book that are known to be trademarks or service marks have been appropriately capitalized. Sams Publishing cannot attest to the accuracy of this information. Use of a term in this book should not be regarded as affecting the validity of any trademark or service mark.
Warning and Disclaimer
Every effort has been made to make this book as complete and as accurate as possible, but no warranty or fitness is implied. The information provided is on an as is basis. The author and the publisher shall have neither liability nor responsibility to any person or entity with respect to any loss or damages arising from the information contained in this book.
ACQUISITIONS EDITOR
Jeff Schultz
DEVELOPMENT EDITORS
Linda Harmony
Scott D. Meyers
MANAGING EDITOR
Charlotte Clapp
PROJECT EDITOR
Christina Smith
COPY EDITOR
Kate Givens
INDEXER
Kevin Kent
PROOFREADER
Candice Hightower
TECHNICAL EDITOR
J. Eric Slone
TEAM COORDINATOR
Amy Patton
INTERIOR DESIGNER
Gary Adair
COVER DESIGNER
Aren Howell
COPYWRITER
Eric Borgert
PRODUCTION
Darin Crone
Liz Patterson
Page iii
Contents at a Glance
Introduction | |
PART I An Introduction to CGI | |
Hour 1 Overview of CGI Programming | |
2 Setting Up Your CGI Environment | |
3 Downloading, Installing, and Debugging CGI Scripts | |
4 Writing Your First CGI Program | |
PART II Capturing User Input | |
Hour 5 Creating HTML Forms | |
6 Processing Input | |
7 Validating User Input | |
8 Creating an Email Feedback Form | |
PART III CGI Programming Languages and Tools | |
Hour 9 CGI and Simple Shell Scripting | |
10 Perl The Big Kahuna of CGI | |
11 Other Popular CGI Programming Languages | |
12 Pros and Cons of Alternate Technologies | |
PART IV Building Basic CGI Applications | |
Hour 13 Using Flat Files for Data Storage | |
14 Creating a CGI-Based Message Board | |
15 Session (State) Management | |
16 Building a Simple Shopping Cart | |
17 Content Publishing with CGI | |
PART V Integrating Databases and CGI | |
Hour 18 Working with Relational Databases | |
19 How to Use the Structured Query Language | |
20 Creating an Online Store | |
Page iv
PART VI Additional CGI Tips and Tricks | |
Hour 21 Working with HTTP | |
22 Securing CGI Scripts | |
23 Creating Custom Error Documents | |
24 Server Side Includes | |
Appendixes | |
Hour A Answers | |
B MIME Types | |
C Response Codes and Reason Phrases | |
D Environment Variables and Request Headers | |
E Summary of Regular Expressions | |
F The ASCII Character Table | |
Index | |
Page v
Contents
Introduction | |
PART I An Introduction to CGI | |
HOUR 1 Overview of CGI Programming | |
Types of Web Applications | |
A History of CGI | |
What Is a CGI Program? | |
How CGI Programs Work | |
How Resources Are Requested | |
Fulfilling the Request | |
Passing Data to a CGI Program | |
Pros and Cons of CGI | |
CGI Programming Languages | |
Perl | |
UNIX Shell | |
The C Language | |
Visual Basic | |
Python | |
Java | |
Summary | |
Q&A | |
Workshop | |
Quiz | |
HOUR 2 Setting Up Your CGI Environment | |
The Web Server Itself | |
Hosting Your CGI Scripts | |
Running Your Own Web Server | |
Web Hosting | |
Web-Server Operating Systems | |
Next page