Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Why Doesn't This CGI Piece Work?

Reply
Thread Tools

Why Doesn't This CGI Piece Work?

 
 
vertigo
Guest
Posts: n/a
 
      06-28-2003
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>";
}
 
Reply With Quote
 
 
 
 
Rob McAninch
Guest
Posts: n/a
 
      07-01-2003
Isofarro <news:(E-Mail Removed)>:

> vertigo wrote:
>
>> 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

>
> 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.

--
Rob - http://rock13.com/
Web Stuff: http://rock13.com/webhelp/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
why why why why why Mr. SweatyFinger ASP .Net 4 12-21-2006 01:15 PM
findcontrol("PlaceHolderPrice") why why why why why why why why why why why Mr. SweatyFinger ASP .Net 2 12-02-2006 03:46 PM
Download a file piece by piece Patrick Plattes Ruby 2 11-30-2006 07:48 PM
Why does this (very simple piece of) code does not work? jblazi Python 5 08-16-2004 01:30 PM
Random Numbers -- why doesn't this piece of code work? Moritz Beller C++ 19 06-04-2004 04:16 PM



Advertisments