From jacobson@math-cs.cns.uni.edu Wed Jul 18 16:47:25 2001 Date: Wed, 18 Jul 2001 16:45:39 -0500 (CDT) From: Mark Jacobson To: 810-088-05@uni.edu Subject: Re: Perl question (fwd) guestBook project... > Some of the people in the class today were a little confused. The > calendar assignment is due friday, that people understand. What is the > other assignment to be done? Many people were talking about this after > class. Is this to just copy down the hand out, get it to work and send > you the URL? In the last lab we didn't really do much with the guest > book. A guestbook is very basic web programming project and very common at many type of web sites where you are allowed to give any type of feedback. We will make it due by NEXT WEDNESDAY. You send me the URL, I go visit your guestbook and leave an entry there. > If you could clear this up that would be great. I was > wondering if we would get to see our quiz from monday to help study for > the test on friday. Of course you will get to see your quizzes tommorrow and we will go over them somewhat by doing lab exercises. If they are not graded to hand back tommorrow, there would be no test on Friday. I got off on a tangent today covering lots of other aspects of Perl, and did not get time to go over the guestBook.lib handout and concepts. When I do go over those, I believe everyone will see that the guestBook Perl program is already about 90% completed, if you attended yesterday's lab. You will not believe how simple it is to finish that up. The two slightly challenging aspect of the guestbook is: 1. getting the permissions set correctly for the actual .html file that needs to be both readable and writable, and 2. using the CGI function param() instead of the hash %formdata and the $formdata{'whatItWasNamedInForm'} where whatItWasNamedInForm is the name of a textfield or whatever, and is the key value that accesses a value that the user typed into that textfield. Use param('whatItWasNamedInForm') instead. %formdata hash was created by the call to Parse_Form function, which was part of subparseform.lib file or library. --------------- require subparseformlib is replaced by use CGI qw(:standard); $formdata{'someNameInForm'} is replaced by param('someNameInForm') SEE MY GUESTBOOK. YOURS WILL BE VERY MUCH LIKE THAT. RANDOM COLORS. FEATURE THAT ALLOWS PEOPLE TO JUST LOOK AT THE GUESTBOOK WITHOUT LEAVING AN ENTRY (This feature is just a link, that is all it is, a LINK to viewGuestBook.html). All the rest of the code you are given. Tell your friends about your guestbook after it is ready and working, so they can stop and leave an entry or see what others have said. Having a guest book is cool. Having a guest book is rare. And among all the amateur web sites that have guest books, a huge percentage probably just grabbed the code from somebody and got help setting it up. You will actually understand how the entire script works and the script includes a feature you don't see in most other guestbooks, random colors. The rgbValue function we wrote yesterday in lab gives a random BGCOLOR RGB triplet and its related, but contrasting TEXT color RGB triplet. Mark