The following links will take you to source code and example programs from CGI Programming 101.
Table of Contents
- Chapter 1: Getting Started - where to write your scripts; how to upload to the Unix host; changing permissions; writing your first CGI
- Chapter 2: Perl Variables - Scalars, arrays, and hashes
- Chapter 3: CGI Environment Variables - Using data from environment variables; writing forms using GET
- Chapter 4: Processing Forms Writing forms using POST: a form-to-mail CGI
- Chapter 5: Advanced Forms Handling radio buttons, checkboxes, and select fields; writing a survey/poll CGI
- Chapter 6: Reading and Writing Data Files - File permissions; how to open, read, write, and close files
- Chapter 7: Multi-Script Forms - passing data between scripts; a flat-file catalog database and multi-part order form
- Chapter 8: Searching & Sorting
- Chapter 9: Using Server-Side Includes - SSI Syntax, list of SSI elemenets, how to include files and execute CGIs; SSI page counter; SSI error logger
- Chapter 10: Randomness - a random image picker; random password generator; random rotating ad banners
- Chapter 11: Redirects and Refreshes - how to send visitors to another page
- Chapter 12: Working With Strings - comparing, finding, joining, and formatting strings
- Chapter 13: Date and Time in Perl - how to generate the date; countdown/up clocks
- Chapter 14: Regular Expressions - pattern matching with Perl
- Chapter 15: HTTP Cookies - how to set and read cookies
- Chapter 16: Writing Secure Scripts - taint checking; protecting your data
- Chapter 17: Beyond Scripts: Perl Modules and CPAN - CGI.pm, GD.pm; where to find modules
- Chapter 18: Database Programming with Perl - an introduction to MySQL and DBI; an SQL-based catalog script; SQL page counter
- Chapter 19: Writing Your Own Modules
- Chapter 20: Working With Unix
- Appendix A: Online Resources
- Appendix B: Unix Tutorial and Command Reference
- Appendix C: Password Tutorial (updated into a complete new chapter - click here to access it!)