#!/usr/bin/perl
# use Term::ReadKey;
use CGI qw(:standard);
# use Data::Dumper;
print header;
print start_html('Leave Comments on Fyre'),
h1('Leave Comments on Fyre'),
start_form,
"Note, all fields are optional, but empty comments will be ignored.
",
"Name: ", textfield(-name=>'name',-default=>''),
"E-mail: ", textfield(-name=>'e-mail',-default=>''),
"Your Comments:
", textarea(-name=>'Comments',-rows=>10,-columns=>50,-default=>''),
'
',
submit('Submit'), reset,
end_form,
p,
hr;
if (param() && param('name') ne '' && param('Comments') ne '') {
$date = `date '+%H:%M %m/%d/%Y'`;
# @comments = param('Comments');
# $toString = "";
# print Dumper \@comments;
# foreach $comments (@comments) {
# if ($comments eq "\n") {
# $toString = $toString + '
';
# }
# else {
# $toString = $toString + $_;
# }
# }
print 'Your comment has been posted.
| ' . param('Comments') . ' |