Skip to content

CGI Fast and Easy Web Development

Best in textbook rentals since 2012!

ISBN-10: 0761529381

ISBN-13: 9780761529385

Edition: 2000

Authors: Johnnie Christenberry, Troy McKenna, T. C. Bradley

List price: $24.99
Blue ribbon 30 day, 100% satisfaction guarantee!
what's this?
Rush Rewards U
Members Receive:
Carrot Coin icon
XP icon
You have reached 400 XP and carrot coins. That is the daily max!

This text is a tool for Web developers with little or no programming experience. Experienced programmers will find it a helpful reference tool and may gain a better understanding of many of the processes currently used.
Customers also bought

Book details

List price: $24.99
Copyright year: 2000
Publisher: Course Technology
Binding: Paperback
Pages: 443
Size: 7.50" wide x 9.00" long x 1.00" tall
Weight: 1.738
Language: English

Introductionp. xvii
CGI: An Introductionp. 1
CGI and the Webp. 3
What Is CGI?p. 4
Why Use CGI?p. 5
Why Is CGI Important to the Web Designer?p. 7
Who Uses CGI?p. 8
CGI Basicsp. 9
What You Need to Run CGI Applicationsp. 10
CGI Server Requirementsp. 11
Getting Started with CGIp. 12
Creating Your cgi-binp. 12
CGI Programming Languagesp. 16
Your Choicesp. 16
The Most Popular CGI Language: Perlp. 16
Preparing Your Web Page for CGIp. 18
Summaryp. 21
Writing Your CGI Applicationp. 23
Planning Ahead Is Importantp. 24
Using Multiple Languagesp. 24
Using Multiple HTML Pagesp. 25
Adopting Proper Form Designp. 28
Planning the Database Designp. 29
Writing Pseudocodep. 32
Learning the Programming Basicsp. 35
Understanding the Difference Between Programs and Scriptsp. 36
Learning the Perl Basicsp. 36
Summaryp. 48
Your First CGI Applicationp. 49
Creating Your Application Using Perlp. 50
Adding Comments to Your Applicationp. 50
Creating Your Application on a PC or Macp. 53
Creating Your Application on a UNIX Serverp. 62
Changing the Permissions of Your Applicationp. 64
Starting Your CGI Application Using Perlp. 66
Finding Perl on Your Serverp. 66
Using the Interpreter's Location in Your Applicationp. 68
Writing Your Perl Codep. 69
Running Your CGI Applicationp. 75
Using the URL to Run the Applicationp. 75
Using a Test HTML Form to Run the Applicationp. 76
Summaryp. 77
Basic Datap. 79
Getting the Data from Vistors to Your Web Pagep. 81
Gathering Data from Your Visitorsp. 82
Using Data Labelsp. 82
Using Name Attributes or HTML Labelsp. 83
Developing Your HTML Formp. 85
Using Text Input Fieldsp. 85
Using Selected Choice Inputsp. 93
Creating Action Buttonsp. 100
Adding Default Values to Your Formsp. 106
Adding Links to Your Formsp. 108
Using Environment Variablesp. 111
Using Post versus Getp. 111
Determining Browser and Platform Informationp. 117
Determining Navigation Informationp. 119
Viewing All Environment Variables at Oncep. 120
Summaryp. 121
Getting the Data Into Your CGI Applicationp. 123
The Importance of the Data in Your Applicationp. 124
The Ability to Interactp. 124
The Means of Communicating with Your Visitorsp. 124
Inputting User Datap. 125
Parsing Data from Forms and Linksp. 125
Inputting Data from Environment Variablesp. 136
Inputting Data Yourselfp. 137
Inputting Data from Scalarsp. 138
Inputting Data from Arraysp. 139
Inputting Data from Hashesp. 142
Dealing with Potential Problemsp. 145
Incorrect Input from Your Usersp. 145
Faulty Data that You Inputp. 146
Summaryp. 147
Scalarsp. 148
Storing Scalar Informationp. 149
Initial Datap. 149
Results of Operationsp. 150
Using Numbers as Scalar Variablesp. 152
Additionp. 152
Subtractionp. 154
Multiplicationp. 155
Divisionp. 159
Using Multiple Operatorsp. 162
Using Strings as Scalar Variablesp. 164
Connecting Stringsp. 164
Repeating Stringsp. 166
Assigning Values to a Variablep. 167
Manipulating Variable Valuesp. 168
Summaryp. 172
Arraysp. 173
Splitting a Scalar Into an Arrayp. 174
Reasons for Splitting a Scalarp. 174
The Process of Splitting a Scalarp. 175
Determining the Length of an Arrayp. 177
Using a Scalar Variablep. 177
Using the Index Numberp. 179
Retrieving Array Datap. 181
Retrieving a Specific Itemp. 182
Retrieving Multiple Itemsp. 186
Modifying an Arrayp. 191
Modifying the Entire Arrayp. 191
Adding Elements to an Arrayp. 195
Removing Array Elementsp. 199
Replacing Array Elementsp. 203
Reversing the Order of Elementsp. 206
Manipulating Arraysp. 207
Combining Arraysp. 207
Sorting Arraysp. 208
Summaryp. 209
Hashesp. 210
Checking for the Existence of a Keyp. 211
Why Checking Is Importantp. 211
How to Check for a Keyp. 211
Retrieving Hash Values Using Keysp. 214
Retrieving a Single Valuep. 214
Retrieving Multiple Valuesp. 216
Retrieving All the Hash Datap. 218
Finding All Hash Valuesp. 218
All Hash Keysp. 219
Retrieving Specific Keys and Valuesp. 221
Retrieving the First Key and Valuep. 221
Retrieving Each Key and Valuep. 224
Retrieving Key-Value Pairs with the Keys Functionp. 225
Removing Key-Value Pairsp. 228
Summaryp. 232
Conditional Statementsp. 233
Comparing Valuesp. 234
Number Comparisonp. 234
String Comparisonp. 235
Evaluating without Comparisonsp. 237
Checking Multiple Comparisonsp. 237
Creating Your Conditional Statementp. 239
Using Conditional Statement Blocksp. 245
The if/unless Statementp. 245
The while/until Statementp. 248
The do {} while/until Statementp. 251
The for Statementp. 255
The foreach Statementp. 258
Nested Conditional Statementsp. 260
Summaryp. 262
Advanced Datap. 263
Handling Data with Regular Expressionsp. 265
Using Regular Expressionsp. 266
Matching Text Patternsp. 267
Single Character Patternsp. 267
Group Patternsp. 271
Anchor Patternsp. 274
Precedencep. 277
Using the Matching Operatorp. 277
Choosing a Different Targetp. 278
Ignoring String Casep. 280
Using Different Delimitersp. 282
Variable Interpolationp. 284
Making Substitutions with Regular Expressionsp. 287
Advanced Substitutionsp. 288
Using the Split Functionp. 291
Summaryp. 294
Subroutinesp. 295
Creating a Subroutinep. 296
A Basic Subroutinep. 296
A Subroutine that Requires Inputp. 297
Storing a Subroutinep. 298
Calling a Subroutinep. 299
Calling a Basic Subroutinep. 300
Calling a Subroutine that Requires Inputp. 300
Calling a Subroutine from an External Filep. 303
Subroutine Return Valuesp. 304
Using the Subroutine Return Valuep. 305
Manually Setting the Return Valuep. 307
Summaryp. 309
Retaining Visitor Datap. 310
Creating Hidden Fieldsp. 311
Adding Hidden Fields to Your Formp. 311
Using a Hidden Field to Store Collected Datap. 313
Understanding Cookiesp. 316
Setting Cookiesp. 317
Reading Your Cookiesp. 325
Tossing Your Cookiesp. 326
Putting It All Togetherp. 328
Summaryp. 332
Outputting Datap. 333
Generating STDOUT Outputp. 334
Normal Output Using printp. 334
Formatted Output Using printfp. 336
Generating HTML Formatted Outputp. 339
Adding HTML Formats to Outputp. 339
Printing Multiple Linesp. 340
Image and Path Linksp. 342
Generating Header and Footer Subroutinesp. 343
Creating Header and Footer Subroutinesp. 344
Calling Header Subroutinesp. 346
Calling Footer Subroutinesp. 347
Generating Table and List Outputsp. 348
Outputting a Hash as a Tablep. 349
Outputting an Array as a Listp. 351
Formatting Numbers and Stringsp. 352
Printing Formatted Datap. 353
Formatting Numbers as Dollars and Centsp. 354
Padding Numbersp. 356
Summaryp. 357
Formatsp. 359
Using Formatsp. 360
Defining a Formatp. 361
Invoking a Formatp. 363
Using Fieldsp. 364
Text Fieldsp. 368
Numeric Fieldsp. 369
Multiline Fieldsp. 370
Filled Fieldsp. 372
Using the Top-of-Page Formatp. 373
Changing Format Defaultsp. 376
Changing the Format Namesp. 376
Changing the Page Lengthp. 378
Summaryp. 379
Files and Directoriesp. 380
Using Filesp. 381
Opening Filesp. 381
Closing Filesp. 386
Writing to Filesp. 387
Reading Data from Filesp. 388
Exclusive File Accessp. 390
Renaming Filesp. 391
Removing Filesp. 394
Checking the Status of Filesp. 395
Using Directoriesp. 398
Opening Directoriesp. 398
Closing Directoriesp. 399
Viewing Directory Contentsp. 400
Changing the Directoryp. 401
Creating New Directoriesp. 402
Removing Directoriesp. 403
Using File and Directory Operationsp. 404
Verifying Files and Directoriesp. 404
Changing Permissions In Your Applicationp. 405
Eliminating Charactersp. 406
Summaryp. 408
Appendixesp. 409
Debugging Your Applicationp. 411
Understanding Debuggingp. 412
Deciphering Error Messagesp. 413
The Dreaded 500 Internal Server Errorp. 414
403 Forbiddenp. 419
The Document Contained No Datap. 419
404 File Not Foundp. 423
Using Other Valuable Debugging Toolsp. 424
Using Error Subroutinesp. 424
Summaryp. 431
What's On the CD-ROMp. 432
Running the CDp. 433
Linuxp. 433
Windows 95/98/2000/NTp. 433
The Prima Licensep. 434
The Prima User Interfacep. 434
Resizing and Closing the User Interfacep. 434
Using the Left Panelp. 434
Using the Right Panelp. 435
Indexp. 436
Table of Contents provided by Syndetics. All Rights Reserved.