Why Doesn't This CGI Piece Work?

V

vertigo

I need to display the text banner inside the sub "credit" below.
I want to call the CGI file, test.cgi, from inside an HTML file.
I need this text banner displayed exactly where I call it in the
HTML file.
What else is need here? I get the error:

Premature end of script headers

Thanks!

vertigo

test.cgi file below:

#!/usr/bin/perl
#############################################
#############################################
($sec,$min,$hr,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime(time);
&credit;
exit;

sub credit {
print "Content-type: text/html\n\n";
print"<center><table width="125" height=""
cellspacing="0" cellpadding="0" border="0" bgcolor="#f6f6f6">";
print "<tr><td width="125" height="240"
align="center" valign="middle" background="blue_lines_dark.gif">";
print "<table width="125" height="145"
cellspacing="0" cellpadding="1" border="2" bgcolor="#000000">";
print "<tr><td>";
print "<table width="100%" height="216"
cellspacing="0" cellpadding="0" border="0" bgcolor="#f6f6f6">";
print "<tr><td width="" height=""
align="center" valign="center" bgcolor="">";
print "<table width="95%" cellpadding="0"
cellspacing="0" border="0">";
print "<tr><td>";
print "<div style="overflow:hidden;
width:115px; padding-left:1px">";
print "<font size="+1" face="arial,sans-serif"
color="#0000ff">";
print "<a HREF=\"just a URL to be activated
when the text banner is clicked\" target=_top>";
print "<b>Pay Day Loans</b></a><br></font>";
print "<font size="+1" face="arial,sans-serif"
color="#000000"><b>Need Some Extra Money Until Payday\? ";
print "We Can Lend You Up to \$1000 <font
color=red>Today\!</font></b><br></font>";
print "</div>";
print "</td></tr></table>";
print "</td></tr></table>";
print "</td></tr></table>";
print "</td></tr>";
print "</table>";
}
 
R

Rob McAninch

Isofarro said:
You have lots of syntax errors in your script. For example
unescaped double quotes in the print statements.

Indeed. See what it says when you run it from the command line.
E.g.

c:> perl -w script.cgi |more

Piping to more so everything doesn't fly by.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top