Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Re: Looking for feed back on a guestbook

by CharlesClarkson (Curate)
on Nov 16, 2001 at 02:01 UTC ( #125697=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    : #!/usr/bin/perl -w
    : use strict;
    : use CGI ':standard';
    
  2. or download this
    use CGI qw/:standard center *font *i *b/;
    
    : use Regexp::Common qw(RE_profanity);
    
  3. or download this
    : print header();
    : print start_html();
    :
    : print "<html><head><title>Thanks for Signing!</title></head>";
    : print "<body bgcolor=black text=white>";
    
  4. or download this
    print
        header,
        start_html(
    ...
    : my $name =$q->param('name');
    : my $mail =$q->param('mail');
    : my $message =$q->param('message');
    
  5. or download this
    my $name    = param('name');
    my $mail    = param('mail');
    my $message = param('message');
    
    : print "<center><p>Thanks for signing my guestbook, your",
    :       "message has been posted! $name!</center></p>";
    
  6. or download this
    print center(
            p(  'Thanks for signing my guestbook, your message ',
                "has been posted! $name!" ));
    ...
    : s/\(red\)/<font color=red>/ig;
    : s/\(\/red\)/<\/font>/ig;
    : };
    
  7. or download this
    my ($red, $sl_red) = qw|\(red\) \(/red\)|;
    foreach ($name, $mail, $message) {
        s/</&lt;/g;
    ...
    : if ($message =~ /\(red\)/i and $message =! /\(\/red\)/i) {
    :   $message=$message."</font>"
    : };
    
  8. or download this
    : print    "Name: $name <br> Email: $mail <br> Message: $message";
  9. or download this
    : open HTML, ">>../gbook.html" or die $!;
    : print HTML "<i>Name:</i> $name <br> <i>E-Mail: </i>$mail<br> ",
    :            "<i>Message: </i>$message <p>";
    
  10. or download this
    print HTML
        i('Name: '), $name, br,
        i('E-Mail: '), $mail, br,
    ...
    
    : close HTML;
    : print "</BODY></HTML>";
    
  11. or download this
    print
        "Name: $name", br,
        "Email: $mail", br,
    ...
        end_html;
    
    __END__
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://125697]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (13)
As of 2014-10-01 17:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (31 votes), past polls