From: Dave C. <da...@da...> - 2002-02-26 20:15:26
|
Simon, Thanks for your comments. I've forwarded them on to the nms developers list where hopefully they'll be chewed over a bit and then applied. Cheers, Dave... ----- Forwarded message from Simon Flack <ma...@si...> ----- Date: Tue, 26 Feb 2002 00:09:55 GMT From: "Simon Flack" <ma...@si...> To: da...@us... Subject: nms-cgi: guestbook Hello Dave, I have just been playing with the guestbook. It works really well, but I came across an unexpected error (might be a bug or maybe I didn't RTFM)... The addguest.html form says "The only blanks that you have to fill in are the comments and name section". Which suggests (in my mind) that you can delete some of the other fields from the form, e.g. "state". Doing so, however, throws up an Internal Server Error on submit because CGI->param('state') was not defined. Obviously it's defined, just empty if leave the field blank. A quick fix is to add an empty hidden field. For a more robust solution, I've included a diff from version 1.28 with a couple of quick fixes. Cheers - Simon -- BEGIN -- 262a263,265 > # Initialise the optional paramaters > $_ = "" for grep !defined, ($city, $state, $country, $url, $realname); > 1177a1181 > return "" unless defined $str; --END-- ----- End forwarded message ----- -- Drugs are just bad m'kay |