Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
I had this darn app. working just last week. Now I can't get it to work on my web site. I believe all of the code is correct. If one of you could just take a small peek at it, I would be most grateful.
#!/usr/bin/perl use strict; # Loads the CGI Module use CGI; # creates a new CGI object my $page = new CGI; # Grab a named CGI parameter my $value = $page->param("Comic"); ##########declare the names of the files for the loop my @Comm = ('Images/Le_Comic.jpg', 'Images/Le_Comic2.jpg', 'Images/Le_ +Comic3.jpg', 'Images/Le_Comic4.jpg', 'Images/Le_Comic5.jpg', 'Images/Le_Comic6.jpg' +, 'Images/Le_Comic7.jpg', 'Images/Le_Comic8.jpg', 'Images/Le_Comic9.jpg' +, 'Images/Le_Comic10.jpg', 'Images/Le_Comic11.jpg', 'Images/Le_Comic12.j +pg', 'Images/Thanksgiving_Comic.jpg'); ########## #Open up the comments file open (FILE, '../Comment.txt') or die "The file could not be opened.\n" +; #Save the contents of the FILE handle to an array my @Comment = <FILE>; #Close the FILE close(FILE); my ('$i','$Como','$Number'); #do a "for" loop to make it choose the quote for ($i=0; $i<=@Comment; $i++) { #Do an "if" loop to go through and save the right quote if ($value eq $Comm[$i]) { $Como = $Comment[$i]; #Save the number of the quote to a variable for the title $Number = $i + 1; } } ## Then: # This will print a standard HTML header print $page->header; print "<HTML><HEAD>\n"; print <<ENDMETA; <META NAME="GENERATOR" CONTENT="Adobe PageMill 3.0 Win"> <TITLE>Animetion Station &gt; Webcomic &gt; Comic &#35;$Number</titl +e> <LINK REL="stylesheet" HREF="../Style.css" TYPE="text/css"> ENDMETA print "</head><BODY>\n"; print <<ENDHTML; <P><CENTER><DIV STYLE="background-color: #0099FF; font-family: Comic S +ans MS; font-size: 20px; width: 200px; color: white;">Web Comics</div></center></p> <P><TABLE WIDTH="757" BORDER="0" CELLSPACING="1" CELLPADDING="0" HEIGH +T="294"> <TR> <TD WIDTH="14%" VALIGN="TOP" ALIGN="CENTER" HEIGHT="293"> <div class="Standard"> <P><CENTER><A HREF="../index.htm">[Home]</a> <HR> <A HREF="../Gallery.shtml">[Gallery]</a> <HR> <A HREF="../Manga.shtml">[Manga]</a> <HR> <A HREF="../Video_Review.shtml">[Video Reviews]</a> <HR> <A HREF="../Links.shtml">[Links]</a> <HR> <A HREF="../Web_Comic.shtml">[Web Comic]</a></center></td> <TD VALIGN="TOP" WIDTH="270" HEIGHT="131"> </div> </td> <TD WIDTH="86%" VALIGN="TOP" BGCOLOR="#3366ff"> <P><CENTER><IMG SRC="../$value"></center></p> <br> <p>$Como</p> <CENTER> <DIV STYLE="font-family: Times New Roman,Times; color: white; widt +h: 350px; background-color: gray; text-align: center;"> <P><B><U>Comics</u></b></p> <P> <A HREF="Testy.cgi?Comic=Images%2fLe_Comic.jpg">Comic #1</a> | <A HREF="Testy.cgi?Comic=Images%2fLe_Comic2.jpg">Comic #2</a> | <A HREF="Testy.cgi?Comic=Images%2fLe_Comic3.jpg">Comic #3</a> | <A HREF="Testy.cgi?Comic=Images%2fLe_Comic4.jpg">Comic #4</a> | + <A HREF="Testy.cgi?Comic=Images%2fLe_Comic5.jpg">Comic #5</a><br +> <A HREF="Testy.cgi?Comic=Images%2fLe_Comic6.jpg">Comic #6</a> | <A HREF="Testy.cgi?Comic=Images%2fLe_Comic7.jpg">Comic #7</a> | <A HREF="Testy.cgi?Comic=Images%2fLe_Comic8.jpg">Comic #8</a> | <A HREF="Testy.cgi?Comic=Images%2fLe_Comic9.jpg">Comic #9</a> | <A HREF="Testy.cgi?Comic=Images%2fLe_Comic10.jpg">Comic #10</a>< +br> <A HREF="Testy.cgi?Comic=Images%2fLe_Comic11.jpg">Comic #11</a> </p> <p> <center><u><font type="Comic Sans MS" size="4">Special Comic</fon +t><u></center><br> <A href="Testy.cgi?Comic=Images%2fThanksgiving_Comic.jpg">Thanksg +iving Comic</a> </p> </div> </center> </td> </tr> </table> ENDHTML print "</body></html>\n";

Edit kudra, 2001-12-02 Changed title

In reply to Program can't work on website; please examine code by Anonymous Monk

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others avoiding work at the Monastery: (4)
    As of 2018-03-18 12:19 GMT
    Find Nodes?
      Voting Booth?
      When I think of a mole I think of:

      Results (230 votes). Check out past polls.