couldn't resist rewriting that huge print statement :)
my @colors = qw/ cyan megantha yellow pink Red Green blue cyan meganth
+a yellow orange /;
my $font = 'Euclid fraktur';
print "<br><br><H1 align='center'><b>";
foreach my $letter ( split //, 'PERL MODULES' ){
do { print $letter; next; } if $letter = ' '; # special case of s
+pace
printf "<font face='%s' color='%s'>%s</font>", $font, $colors[0], $l
+etter;
push @colors, shift @colors; # rotate the colors
}
print "</b></H1>";
As for your primary issue, I would suggest that index.cgi contain the login form (instead of a static index.html) so that you can dynamically add a message to it. Some pseudo code:
$message = '';
if( $login_form_submitted ){
check user and pass params
if ok
redirect to main page
else
$message = 'login failed'
end
}
print login form here, including $message if it is set
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, details, 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, summary, 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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.