Feedback form Program

Domain Hosting image
Web Hosting
Dedicated server
ssl certificate
Web Design image
Email

One of the common use of CGI programming is to solicit and accept feedback from users. The next few sections present CGI program to handle the input from a feedback form.

Note that the feedback form has two fields:

The comment field is where the user enters comments.
The e mail field is where the user enters an e mail address.

Processing user Feedback

The METHOD attribute of the

tag specifies that the web browser should send the form's data through a POST request.

The feedback.cgi CGI program that process the feedback form has to perform the following tasks:

If the method is not POST, report an error and exit. Read and parse the form's data. Save the comment and e mail fields in a log file with a date and time stamp and any other relevant information (such as the site from which the user sent the feedback). Return a "thank you" note to the user in the form of an HTML document

Here are some points to help you design the CGI program in Perl:

Include the cgi lib.pl library to parse the CGI input and the ctime.pl library to get the current date and time.
Use the MethPost subroutine from cgi lib.pl to check whether the method is POST.



Domain Name Search www.



Copyright (C) 2007. Web Domain design hosting. All rights reserved.