|
|
PERL CGI Tutorial
|
Contents Getting Started in CGISend HTML Page to Browser Parse HTML Form Saving to a File Open a File and Display Contents Using the Split Function Search a File Sort a File Display a Multi Line File in Tables Display a Multi Line File in a Textarea Working with Numbers Using Sendmail |
Parse the FormThe action statement in the form above specifies a script named parse_form.pl. This CGI script will convert the information received from the form into usable data and send it to the browser in the form of an HTML page. Parsing is simply taking the information received from a form and converting it back to usable a form. The first block of code is fairly universal. You can use it to parse just about any form using the POST method. The last 2 lines would be changed to coincide with the input box names on the form. parse_form.pl
Helpful InformationWindows users: Copy the code for each script and paste it into Notepad. Use the Saveas function to save the scripts with a .pl extension. Upload them to your cgi-bin folder and use the Chmod function to change the permissions for each script to 755. Run the form.pl script from your browser by typing yourdomain/cgi-bin/form.pl
|
|
|
|
|
| HTML TOC | Website Design Workshop | Home | |