Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CGI Tables

Status
Not open for further replies.

sulfericacid

Programmer
Aug 15, 2001
244
US
After installing the CGI tables I can't get my script to work. My debugger doesn't show any errors and fatalsToBrowser isn't showing anything other than the standard 500 error warning. My script doesn't load at all and I can't for the life of me figure out what's wrong.

Does anyone see anything which may be the problem?

#!/usr/bin/perl -w

use CGI::Carp 'fatalsToBrowser';
use strict;
use warnings;

my $adv = "Advertise your script here!";
my $adminmail = "sulfericacid\@qwest.net";

use CGI qw/:standard/;

print header,
start_html(),


print start_form(), table(
Tr(td( "Email Address: "), td(textfield('usermail')) ),
Tr(td("Author: "), td(textfield('author')) ),
Tr(td("Distributor: "), td(textfield('distributor')) ),
Tr(td("Copyright: "), td(textfield('copyright')) ),
Tr(td("Abstract: "), td(textfield('abstract')) ),
Tr(td("Keywords: "), td(textarea(-name=>'keywords',
-rows=>10,
-columns=>50)) ),
Tr(td("Description: "), td(textarea(-name=>'description',
-rows=>10,
-columns=>50)) ),
Tr(td("Robots: "), td(popup_menu(-name=>'robots',
-values=>['','index','noindex','follow','nofollow'])) ),
Tr(td("Distribution: "), td(popup_menu(-name=>'distribution',
-values=>['','local','global'])) ),
Tr(td("Language: "), td(popup_menu(-name=>'language',
-values=>['','EN','EN-GB','EN-US','ES','ES-ES','FR','IT','JA','KO','DE'])) ),
Tr(td("Rating: "), td(popup_menu(-name=>'rating',
-values=>['','kids','general','mature','restricted'])) ),
Tr(td(), td(submit) ),
),
end_form(),
hr();

my $abstract = param('abstract');
my $usermail = param('usermail');
my $author = param('author');
my $distributor = param('distributor');
my $keywords = param('keywords');
my $description = param('description');
my $distribution = param('distribution');
my $robots = param('robots');
my $rating = param('rating');
my $language = param('language');
my $copyright = param('copyright');


my $tags ='';
if (param('abstract') ne "") {
$tags .= qq(<meta name=&quot;abstract&quot; content=&quot;$abstract&quot;><br>);
}
if (param('author') ne &quot;&quot;) {
$tags .= qq(<meta name=&quot;author&quot; content=&quot;$author&quot;><br>);
}
if (param('distributor') ne &quot;&quot;) {
$tags .= qq(<meta name=&quot;distributor&quot; content=&quot;$distributor&quot;><br>);
}
if (param('copyright') ne &quot;&quot;) {
$tags .= qq(<meta name=&quot;copyright&quot; content=&quot;$copyright&quot;><br>);
}
if (param('keywords') ne &quot;&quot;) {
$tags .= qq(<meta name=&quot;keywords&quot; content=&quot;$keywords&quot;><br>);
}
if (param('description') ne &quot;&quot;) {
$tags .= qq(<meta name=&quot;description&quot; content=&quot;$description&quot;><br>);
}

$tags .= qq(<meta name=&quot;generator&quot; content=&quot;$adv&quot;><br>);

if (param('robots') ne &quot;&quot;) {
$tags .= qq(<meta name=&quot;robots&quot; content=&quot;$robots&quot;><br>);
}
if (param('language') ne &quot;&quot;) {
$tags .= qq(<meta name=&quot;language&quot; content=&quot;$language&quot;><br>);
}
if (param('distribution') ne &quot;&quot;) {
$tags .= qq(<meta name=&quot;distribution&quot; content=&quot;$distribution&quot;><br>);
}
if (param('rating') ne &quot;&quot;) {
$tags .= qq(<meta name=&quot;rating&quot; content=&quot;$rating&quot;><br>);
}

if (param()) {
print $tags;
print hr;
print end_html();
} &quot;Age is nothing more than an inaccurate number bestowed upon each of us at birth as just another means for others to judge and classify us- sulfericacid
 
I'd say the missing semi-colon is a good place to start:
Code:
  print header,
        start_html(), # <--- ';' instead of ','
jaa
 
Thanks so much, that was the problem! This is my first time using CGI, can you tell me what the difference between , and ; is and why it wouldn't have given me an error hinting an expected semi colon?

Thanks again! &quot;Age is nothing more than an inaccurate number bestowed upon each of us at birth as just another means for others to judge and classify us- sulfericacid
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top