Kyle,
    Well, I'd start by printing an actual content type instead of depending on CGI.pm 
for that:
---------------------------------------
print "content-type: text/html\n\n";
---------------------------------------
    Second, I would condense your if to this
---------------------------------------
my $c = param('c');
my $content = $c;
$content = "\n" if ($c eq "h" or $c eq "eh" or $c eq "hd" or $c eq "p" or $c eq "c" or 
$c eq "su");
---------------------------------------
    Then I would HIGHLY recommend that you not depend on CGI.pm so heavily.  I would 
suggest you
print out your own html, then you can see exactly what it is displaying and know what 
to change.  If
you wanted to print it all in one clump, you could do it like this.
---------------------------------------
# the qq^ makes it use ^ as the quote.  Just make sure if you us a ^ inside that you 
escape it (like
this \^ )
print qq^
<html>
<head>
<title>$thetitle</title>
</head>
<body bgcolor="#FFFFFF">
<!-- the rest of your html goes in here -->
</body>
</html>
^;
---------------------------------------

Trust me on this one, it will save you so much headache if you will just print your 
own html.

Regards,
David


----- Original Message -----
From: "Kyle Babich" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 24, 2002 2:09 PM
Subject: Displaying Problems


For the following the syntax is correct but when I try to open it
nothing displays, what should I change?

#!/usr/bin/perl -wT
use strict;
use CGI::Pretty qw/ :standard /;
$CGI::DISABLE_UPLOADS = 1;
$CGI::POST_MAX = 512 * 1024;

print header ( "text/html" );

my $date = localtime;

my $c = param('c');
my $content = "c";

if ($c eq "h") {
   $content = qq{\n};
} elsif ($c eq "eh") {
   $content = qq{\n};
} elsif ($c eq "hd") {
   $content = qq{\n};
} elsif ($c eq "p") {
   $content = qq{\n};
} elsif ($c eq "c") {
   $content = qq{\n};
} elsif ($c eq "su") {
   $content = qq{\n};
}

my @nav = ("Home","E-Mail Hosting","Help
Desk","Policies","Contact","Signup");

my @loc = ("index.cgi?c=h","index.cgi?c=eh","index.cgi?c=hd","index.cgi?
c=p",
       "index.cgi?c=c","index.cgi?c=su");

print start_html(
      -title => "IMAP.cc E-Mail Hosting",
       -head  => Link(
       {
           -rel => "stylesheet",
           -type => "text/css",
           -href => "style.css"
       }
       ),
   ),
   body( -bgcolor => "\#FFFFFF" ),
   table({
           -width => "95\%",
           -cellspacing => "0",
           -cellpadding => "0",
           -border => "1",
           -bordercolor => "\#000000"},
   tbody(
Tr(
td( {-width => "100\%"},
   table({
-width => "100\%",
-cellspacing => "0",
-cellpadding => "1",
-border => "1",
-bordercolor => "\#000000"
-align => "center"},
   tbody(
Tr(
td( {-width => "100\%",
-bgcolor => "\#000000",
-align => "center"},
   Font({
-face => "Verdana, Arial, Times New Roman",
-size => "4",
-color => "\#FFFFFF"},
"IMAP.cc"
)
),),),),),),),),
end_html
--


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to