Cobo has asked for the wisdom of the Perl Monks concerning the following question:
I'm proably doing a bunch of stuff wrong heh, any feed back you can provide would be helpful, thanks :)#!/usr/local/bin/perl use CGI; use CGI ':standard'; print header; print start_html('Chat'), h1('Chat'), start_form, "Name ",textfield('name'), p, "Say ",textfield('say'), p, submit, end_form, hr; if (param()) { $say=(param('say')); $name=(param('name')); $say =~ s/</</g; #Stops user from entering the < in both name +and speech $name =~ s/</</g; #Leaves the > allowed, you can't enter HTML w +ithout < $say =~ s/!{5}/!/g; #Although this won't take care of all mul +tiple ! it can reduce #the number to help avoid multiple lines of just !'s open CHAT, ">>../chatty2.html"; print CHAT "<h5><i>",$name,": </i><b>",$say,"</b></h5>\n"; close CHAT } print end_html;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Seeking Feed back
by azatoth (Curate) on Jul 05, 2001 at 12:34 UTC | |
by orkysoft (Friar) on Jul 05, 2001 at 13:04 UTC | |
by tilly (Archbishop) on Jul 05, 2001 at 15:58 UTC | |
by azatoth (Curate) on Jul 05, 2001 at 16:20 UTC | |
by tilly (Archbishop) on Jul 05, 2001 at 18:01 UTC | |
by pmas (Hermit) on Jul 05, 2001 at 18:03 UTC | |
| |
by orkysoft (Friar) on Jul 05, 2001 at 16:53 UTC | |
by tilly (Archbishop) on Jul 05, 2001 at 17:52 UTC | |
| |
by Chady (Priest) on Jul 05, 2001 at 15:46 UTC | |
|
Re: Seeking Feed back
by Maestro_007 (Hermit) on Jul 05, 2001 at 19:20 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |