Hello,
I have been working on changing the way my form displays the text when it is submitted using tables. I'm not very familiar with CGI and not quite sure where I went wrong. Any assistance will be greatly appreciated.
Thank you
Hope
SCRIPT EXCERPT:
# Open Link File to Output
open (GUEST,">$guestbookreal") | | die "Can't Open $guestbookreal: $!\n";
for ($i=0;$i<=$SIZE;$i++) {
$_=$LINES[$i];
if (/<!--begin-->/) {
if ($entry_order eq '1') {
print GUEST "<!--begin-->\n";
}
if ($line_breaks == 1) {
print GUEST "<CENTER><TABLE CELLPADDING=2 ALIGN=Center WIDTH=75%><TR>/n";
print GUEST "<TD><FONT size=\"2\" face=\"arial, helvetica\">$FORM{'description'} =~ s/\cM\n/<br>\n/g;
}
(LINE 102)
print GUEST "<b>$FORM{'title'}</b><br>\n";
if ($FORM{'url'}) {
print GUEST "<a href=\"$FORM{'url'}\">$FORM{'url'}</a><BR>";
}
else {
print GUEST "$FORM{'url'}<BR>";
}
if ( $FORM{'username'} ){
if ($linkmail eq '1') {
print GUEST " <a href=\"mailto:$FORM{'username'}\">";
print GUEST "$FORM{'username'}</a><BR>";
}
else {
print GUEST " $FORM{'username'}<BR>";
}
}
print GUEST "\n";
if ( $FORM{'awarded'} ){
print GUEST "$FORM{'awarded'}<BR>";
}
if ( $FORM{'description'} ){
print GUEST " $FORM{'description'}<BR>";
}
if ( $FORM{'country'} ){
print GUEST " $FORM{'country'}<BR>";
}
if ($separator eq '1') {
print GUEST " - $date<BR>\n\n";
}
else {
print GUEST " - $date<BR></FONT></TD></TR></TABLE></CENTER>\n\n";
}
if ($entry_order eq '0') {
print GUEST "<!--begin-->\n";
}
ERROR LOG:
syntax error at /usr/www/xxx/httpd/cgi-bin/awarded.pl line 102, near "b>"
syntax error at /usr/www/xxx/httpd/cgi-bin/awarded.pl line 102, near "br>"
String found where operator expected at /usr/www/xxx/httpd/cgi-bin/awarded.pl line 105, near "print GUEST ""
(Might be a runaway multi-line "" string starting on line 102)
(Missing semicolon on previous line?)
Scalar found where operator expected at /usr/www/xxx/httpd/cgi-bin/awarded.pl line 105, at end of line
(Missing operator before ?)
syntax error at /usr/www/xxx/httpd/cgi-bin/awarded.pl line 105, near "<a href=\"$FORM{'url'}\">$FORM"
syntax error at /usr/www/xxx/httpd/cgi-bin/awarded.pl line 105, near "BR>"
Scalar found where operator expected at /usr/www/xxx/httpd/cgi-bin/awarded.pl line 108, at end of line
(Might be a runaway multi-line "" string starting on line 105)
(Missing operator before ?)
I have been working on changing the way my form displays the text when it is submitted using tables. I'm not very familiar with CGI and not quite sure where I went wrong. Any assistance will be greatly appreciated.
Thank you
Hope
SCRIPT EXCERPT:
# Open Link File to Output
open (GUEST,">$guestbookreal") | | die "Can't Open $guestbookreal: $!\n";
for ($i=0;$i<=$SIZE;$i++) {
$_=$LINES[$i];
if (/<!--begin-->/) {
if ($entry_order eq '1') {
print GUEST "<!--begin-->\n";
}
if ($line_breaks == 1) {
print GUEST "<CENTER><TABLE CELLPADDING=2 ALIGN=Center WIDTH=75%><TR>/n";
print GUEST "<TD><FONT size=\"2\" face=\"arial, helvetica\">$FORM{'description'} =~ s/\cM\n/<br>\n/g;
}
(LINE 102)
print GUEST "<b>$FORM{'title'}</b><br>\n";
if ($FORM{'url'}) {
print GUEST "<a href=\"$FORM{'url'}\">$FORM{'url'}</a><BR>";
}
else {
print GUEST "$FORM{'url'}<BR>";
}
if ( $FORM{'username'} ){
if ($linkmail eq '1') {
print GUEST " <a href=\"mailto:$FORM{'username'}\">";
print GUEST "$FORM{'username'}</a><BR>";
}
else {
print GUEST " $FORM{'username'}<BR>";
}
}
print GUEST "\n";
if ( $FORM{'awarded'} ){
print GUEST "$FORM{'awarded'}<BR>";
}
if ( $FORM{'description'} ){
print GUEST " $FORM{'description'}<BR>";
}
if ( $FORM{'country'} ){
print GUEST " $FORM{'country'}<BR>";
}
if ($separator eq '1') {
print GUEST " - $date<BR>\n\n";
}
else {
print GUEST " - $date<BR></FONT></TD></TR></TABLE></CENTER>\n\n";
}
if ($entry_order eq '0') {
print GUEST "<!--begin-->\n";
}
ERROR LOG:
syntax error at /usr/www/xxx/httpd/cgi-bin/awarded.pl line 102, near "b>"
syntax error at /usr/www/xxx/httpd/cgi-bin/awarded.pl line 102, near "br>"
String found where operator expected at /usr/www/xxx/httpd/cgi-bin/awarded.pl line 105, near "print GUEST ""
(Might be a runaway multi-line "" string starting on line 102)
(Missing semicolon on previous line?)
Scalar found where operator expected at /usr/www/xxx/httpd/cgi-bin/awarded.pl line 105, at end of line
(Missing operator before ?)
syntax error at /usr/www/xxx/httpd/cgi-bin/awarded.pl line 105, near "<a href=\"$FORM{'url'}\">$FORM"
syntax error at /usr/www/xxx/httpd/cgi-bin/awarded.pl line 105, near "BR>"
Scalar found where operator expected at /usr/www/xxx/httpd/cgi-bin/awarded.pl line 108, at end of line
(Might be a runaway multi-line "" string starting on line 105)
(Missing operator before ?)