Sample Chapters

CGI Programming 101 will show you how to add guestbooks, page counters, shopping carts and other interactive elements to your website. It's easy to learn; if you know HTML, you can learn CGI. You don't need any prior programming experience.

The first six chapters from the book are available below (or you can download them as a printable PDF file - 78 pages, 609K). Get started today!


What is CGI? Why learn it? What do you need to get started?


Getting Started

Where to write your programs; how to upload to the server; changing permissions; writing your first CGI


Perl Variables

Scalars, arrays, and hashes


CGI Environment Variables

Using data from environment variables; writing forms using HTTP GET


Processing Forms and Sending Mail

Writing forms using HTTP POST: a form-to-mail CGI


Advanced Forms and Perl Control Structures

Handling radio buttons, checkboxes, and select fields; writing a survey/poll CGI


Reading and Writing Data Files

File permissions; how to open, read, write, and close files

Get the book!

Ready to learn more? Get the book and learn how to work with MySQL databases, how to build your own shopping cart, how to password-protect your site, and more!

Back to Top