Here are the common errors web design students frequently make in performing the CGI/PERL script exercise.
Form Action.The "action" you want the form to take is to call the PERL script. The name of the perl script file is tl_form.pl". The ".pl" extension stands for "PERL." Your Perl script file will be loaded by you to the cgi-bin on your web4students site. The URL address that you put in the form action value is the URL of your site/cgi-bin/tl_form.pl. Though your individual code may differ, it may look something like this. http://web4students.montgomerycollege.edu/courses/Fall2003/WDCE/CMP04925039/student29/cgi-bin/tl_form.pl."
You must put this full absolute address into your form -- not a relative address. Remember, the visitor to your site is submitting the information from his/her client computer's browser display of the form to your remote server. If you use a relative address, you would be pointing to a location on the visitor's home computer which does not exist and which does not contain an executable Perl script. So, the <form action=""> command must post the data to the remote server's cgi-bin folder and the PERL program you have uploaded for execution.
If you spell the file name wrong, such as "book.p1", (the number One) then your script won't work! P and the number 1 do not form the correct extension for a "PERL" script.
Remember to Upload Perl files as "ASCII" files, and to Set the Permissions. You must take the following two special steps to properly upload your PERL script files and get them to execute:
Name of the file where the Visitor's input data is printed. Your "hidden" input tag must point at the file called NNbook.txt, where NN are your first and last initials. Remember, PERL is case sensitive, so your first and last initials must be capitalized.
Many students point the FORM tag at the right perl script , for example, "http://web4students.montgomerycollege.edu/courses/Fall2003/WDCE/CMP04925039/student29/cgi-bin/tl_form.pl". However, many students also mis-code the separate "Hidden" input tag. This will prevent you from capturing the information and reviewing it. The PERL script is set up to print it to a special place, and you have to get the name exactly right for the visitor's input data to be saved.
If you can't find your log file where the text is stored, and you think your form is working, try this: Type in the name of the file exactly as you have listed it in the HIDDEN INPUT tag you added to your web site. The server may automatically set up a log file with the name you specify in the HIDDEN INPUT tag -- that's where you'll find your data!! So, make sure the name in your HTML code and the file name you type into your URL match.
When you test other student's forms, when you do next week's evaluations, the "Thank You" Message should be returned to your computer screen upon your submitting the form data.