Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Free For All

Status
Not open for further replies.

Andy252

Programmer
Sep 24, 2001
2
0
0
GB
I want to add a command to stop html. when html is detected in the form, it should go to &htmlerror and stop.

Can you help please?


#!/usr/bin/perl

$ffadbpath = '/web/sites/233/andihuk/###############################################################################
### IF DAMAGE OCCURS DUE TO THIS SCRIPT YOU AGREE NOT TO HOLD ME RESPONSILE ###
###############################################################################

read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
@pairs = split(/&/, $buffer);
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ s/~!/ ~!/g;
$FORM{$name} = $value;
}

if ($FORM{'url'} eq "" || $FORM{'title'} eq "" || $FORM{'description'} eq "") {
&adderror;
exit;


}else{

open (DUPL, "$ffadbpath") || &error;
while (<DUPL>) {
if (/$FORM{'url'}\/?&quot;/go) {
&Copyerror;
close DUPL;
exit;
}
}
close (DUPL);

open (FFALINK, &quot;>>$ffadbpath&quot;) || &error;
flock(FFALINK, 2);
print FFALINK &quot;<LI><A HREF=\&quot;$FORM{'url'}\&quot;>$FORM{'title'}</A><BR>$FORM{'description'}<BR><BR>\n&quot;;
close(FFALINK);
flock(FFALINK, 8);

print &quot;Content-Type: text/html\n\n&quot;;
print <<&quot;Thankyou&quot;;
<html>
<head>
<title>Site Added</title>
<link rel=&quot;stylesheet&quot; href=&quot;images/cystile.css&quot;>
<meta name=&quot;description&quot; content=&quot;Free web site design templates to jump start your new web site.&quot;>
<meta http-equiv=&quot;keywords&quot; content=&quot;free web site design template search graphic sets build web site&quot;>
<meta name=&quot;GENERATOR&quot; content=&quot;Namo WebEditor v2.00&quot;>
</head>
<body bgcolor=&quot;black&quot; text=&quot;#92BB8E&quot; link=&quot;#009900&quot; vlink=&quot;#009900&quot; alink=&quot;#009900&quot; leftmargin=&quot;0&quot; topmargin=&quot;0&quot;>

<table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;740&quot;>
<tr>
<td width=&quot;26%&quot; valign=&quot;top&quot;><table border cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;180&quot; height=&quot;60&quot; align=&quot;center&quot; bordercolorlight=&quot;#03AD00&quot; bordercolordark=&quot;#000000&quot;>
<tr>
<td><p align=&quot;center&quot;><font face=&quot;Verdana&quot; size=&quot;4&quot; color=&quot;#009900&quot;><b>Runway 2</b></font></td>
</tr></table></td>
<td width=&quot;74%&quot; valign=&quot;top&quot;><table border cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;540&quot; height=&quot;60&quot; bordercolorlight=&quot;#009900&quot; bordercolordark=&quot;#000000&quot;>
<tr>
<td><form method=&quot;get&quot; action=&quot;<input type=hidden name=&quot;scope&quot; value=&quot;web&quot;><input type=hidden name=&quot;origin&quot; value=&quot;nnnn&quot;><input type=hidden name=&quot;qSource&quot; value=&quot;n&quot;><div align=&quot;center&quot;><table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;255&quot; bgcolor=&quot;black&quot;>
<tr>
<td align=&quot;right&quot; rowspan=&quot;2&quot; bgcolor=&quot;black&quot;><p><img src=&quot; border=&quot;0&quot;></td>
<td bgcolor=&quot;black&quot;><p><img src=&quot; border=&quot;0&quot;></td>
<td align=&quot;left&quot; bgcolor=&quot;black&quot;><p><img src=&quot; border=&quot;0&quot;></td>
<td bgcolor=&quot;black&quot;><p><img src=&quot; width=&quot;1&quot; height=&quot;1&quot; border=&quot;0&quot;></td>
</tr><tr>
<td align=&quot;right&quot; colspan=&quot;2&quot; bgcolor=&quot;black&quot;><p><input type=&quot;text&quot; name=&quot;ask&quot; size=&quot;14&quot;> </td>
<td bgcolor=&quot;black&quot;><p><input type=&quot;image&quot; src=&quot; border=&quot;0&quot;></td>
</tr></form>
</table></div></td>
</tr></table></td>
</tr><tr>
<td width=&quot;26%&quot; height=&quot;426&quot; valign=&quot;top&quot;><table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;202&quot; background=&quot;images/sborg.gif&quot;>
<tr>
<td height=&quot;388&quot; valign=&quot;top&quot;><p><br>
<br>
<br>
<br>
<br>
<br>
<table border cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;104&quot; bordercolorlight=&quot;#03AD00&quot; bordercolordark=&quot;#000000&quot; align=&quot;right&quot;>
<tr>
<td class=&quot;menu&quot;><p align=&quot;center&quot;><font face=&quot;Verdana&quot; size=&quot;2&quot;><a href=&quot; target=&quot;_top&quot;>Home</a></font></td>
</tr><tr>
<td class=&quot;menu&quot;><p align=&quot;center&quot;><font face=&quot;Verdana&quot; size=&quot;2&quot;><a href=&quot; target=&quot;_top&quot;>Chat</a></font></td>
</tr><tr>
<td class=&quot;menu&quot;><p align=&quot;center&quot;><font face=&quot;Verdana&quot; size=&quot;2&quot;><a href=&quot; target=&quot;_top&quot;>Forum</a></font></td>
</tr><tr>
<td class=&quot;menu&quot;><p align=&quot;center&quot;><font face=&quot;Verdana&quot; size=&quot;2&quot;><a href=&quot; target=&quot;_top&quot;>Free For All</a></font></td>
</tr><tr>
<td class=&quot;menu&quot;><p align=&quot;center&quot;><font face=&quot;Verdana&quot; size=&quot;2&quot;><a href=&quot; target=&quot;_top&quot;>Web Design</a></font></td>
</tr><tr>
<td class=&quot;menu&quot;><p align=&quot;center&quot;><font face=&quot;Verdana&quot; size=&quot;2&quot;><a href=&quot; target=&quot;_top&quot;>Email Me</a></font></td>
</tr></table></td>
</tr></table></td>
<td width=&quot;74%&quot; height=&quot;426&quot; valign=&quot;top&quot;><table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;2&quot; height=&quot;10&quot; background=&quot;images/vline.gif&quot; align=&quot;center&quot;>
<tr>
<td><p>&nbsp;</td>
</tr></table>
<table border cellpadding=&quot;20&quot; cellspacing=&quot;0&quot; width=&quot;540&quot; bordercolorlight=&quot;#03AD00&quot; bordercolordark=&quot;#000000&quot;>
<tr>
<td height=&quot;417&quot; valign=&quot;top&quot; class=&quot;menu&quot;><p class=&quot;text&quot;><font size=&quot;3&quot;><b>Thank You</b></font></p>
<p class=&quot;text&quot;><font size=&quot;2&quot;><b>You site has been added to the &quot;Free For All&quot; database. Click &quot;Free For All&quot; from the
menu to view the list.</b></font></td>
</tr></table></td>
</tr><tr>
<td width=&quot;26%&quot; valign=&quot;top&quot;><p>&nbsp;</td>
<td width=&quot;74%&quot; valign=&quot;top&quot;><table border cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;540&quot; bordercolorlight=&quot;#03AD00&quot; bordercolordark=&quot;#000000&quot;>
<tr>
<td align=&quot;center&quot;><p class=&quot;text2&quot;>© Copyright 2001. All rights reserved. <br>
Contact: Runway2 </td>
</tr></table></td>
</tr></table>
<p align=&quot;center&quot;>&nbsp;</p>
<p align=&quot;center&quot;>&nbsp;</p>
</body>
</html>


Thankyou
}


sub adderror {
print &quot;Content-type: text/html\n\n&quot;;
print <<&quot;Adderror&quot;;
<html>
<head>
<title>Error</title>
<link rel=&quot;stylesheet&quot; href=&quot;images/cystile.css&quot;>
<meta name=&quot;description&quot; content=&quot;Free web site design templates to jump start your new web site.&quot;>
<meta http-equiv=&quot;keywords&quot; content=&quot;free web site design template search graphic sets build web site&quot;>
<meta name=&quot;GENERATOR&quot; content=&quot;Namo WebEditor v2.00&quot;>
</head>
<body bgcolor=&quot;black&quot; text=&quot;#92BB8E&quot; link=&quot;#009900&quot; vlink=&quot;#009900&quot; alink=&quot;#009900&quot; leftmargin=&quot;0&quot; topmargin=&quot;0&quot;>

<table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;740&quot;>
<tr>
<td width=&quot;26%&quot; valign=&quot;top&quot;><table border cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;180&quot; height=&quot;60&quot; align=&quot;center&quot; bordercolorlight=&quot;#03AD00&quot; bordercolordark=&quot;#000000&quot;>
<tr>
<td><p align=&quot;center&quot;><font face=&quot;Verdana&quot; size=&quot;4&quot; color=&quot;#009900&quot;><b>Runway 2</b></font></td>
</tr></table></td>
<td width=&quot;74%&quot; valign=&quot;top&quot;><table border cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;540&quot; height=&quot;60&quot; bordercolorlight=&quot;#009900&quot; bordercolordark=&quot;#000000&quot;>
<tr>
<td><form method=&quot;get&quot; action=&quot;<input type=hidden name=&quot;scope&quot; value=&quot;web&quot;><input type=hidden name=&quot;origin&quot; value=&quot;nnnn&quot;><input type=hidden name=&quot;qSource&quot; value=&quot;n&quot;><div align=&quot;center&quot;><table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;255&quot; bgcolor=&quot;black&quot;>
<tr>
<td align=&quot;right&quot; rowspan=&quot;2&quot; bgcolor=&quot;black&quot;><p><img src=&quot; border=&quot;0&quot;></td>
<td bgcolor=&quot;black&quot;><p><img src=&quot; border=&quot;0&quot;></td>
<td align=&quot;left&quot; bgcolor=&quot;black&quot;><p><img src=&quot; border=&quot;0&quot;></td>
<td bgcolor=&quot;black&quot;><p><img src=&quot; width=&quot;1&quot; height=&quot;1&quot; border=&quot;0&quot;></td>
</tr><tr>
<td align=&quot;right&quot; colspan=&quot;2&quot; bgcolor=&quot;black&quot;><p><input type=&quot;text&quot; name=&quot;ask&quot; size=&quot;14&quot;> </td>
<td bgcolor=&quot;black&quot;><p><input type=&quot;image&quot; src=&quot; border=&quot;0&quot;></td>
</tr></form>
</table></div></td>
</tr></table></td>
</tr><tr>
<td width=&quot;26%&quot; height=&quot;426&quot; valign=&quot;top&quot;><table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;202&quot; background=&quot;images/sborg.gif&quot;>
<tr>
<td height=&quot;388&quot; valign=&quot;top&quot;><p><br>
<br>
<br>
<br>
<br>
<br>
<table border cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;104&quot; bordercolorlight=&quot;#03AD00&quot; bordercolordark=&quot;#000000&quot; align=&quot;right&quot;>
<tr>
<td class=&quot;menu&quot;><p align=&quot;center&quot;><font face=&quot;Verdana&quot; size=&quot;2&quot;><a href=&quot; target=&quot;_top&quot;>Home</a></font></td>
</tr><tr>
<td class=&quot;menu&quot;><p align=&quot;center&quot;><font face=&quot;Verdana&quot; size=&quot;2&quot;><a href=&quot; target=&quot;_top&quot;>Chat</a></font></td>
</tr><tr>
<td class=&quot;menu&quot;><p align=&quot;center&quot;><font face=&quot;Verdana&quot; size=&quot;2&quot;><a href=&quot; target=&quot;_top&quot;>Forum</a></font></td>
</tr><tr>
<td class=&quot;menu&quot;><p align=&quot;center&quot;><font face=&quot;Verdana&quot; size=&quot;2&quot;><a href=&quot; target=&quot;_top&quot;>Free For All</a></font></td>
</tr><tr>
<td class=&quot;menu&quot;><p align=&quot;center&quot;><font face=&quot;Verdana&quot; size=&quot;2&quot;><a href=&quot; target=&quot;_top&quot;>Web Design</a></font></td>
</tr><tr>
<td class=&quot;menu&quot;><p align=&quot;center&quot;><font face=&quot;Verdana&quot; size=&quot;2&quot;><a href=&quot; target=&quot;_top&quot;>Email Me</a></font></td>
</tr></table></td>
</tr></table></td>
<td width=&quot;74%&quot; height=&quot;426&quot; valign=&quot;top&quot;><table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;2&quot; height=&quot;10&quot; background=&quot;images/vline.gif&quot; align=&quot;center&quot;>
<tr>
<td><p>&nbsp;</td>
</tr></table>
<table border cellpadding=&quot;20&quot; cellspacing=&quot;0&quot; width=&quot;540&quot; bordercolorlight=&quot;#03AD00&quot; bordercolordark=&quot;#000000&quot;>
<tr>
<td height=&quot;417&quot; valign=&quot;top&quot; class=&quot;menu&quot;><p class=&quot;text&quot;><font size=&quot;3&quot;><b>Error</b></font></p>
<p class=&quot;text&quot;><font size=&quot;2&quot;><b>You did not complete the form correctly. Please go back and check the information that you
entered.</b></font></td>
</tr></table></td>
</tr><tr>
<td width=&quot;26%&quot; valign=&quot;top&quot;><p>&nbsp;</td>
<td width=&quot;74%&quot; valign=&quot;top&quot;><table border cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;540&quot; bordercolorlight=&quot;#03AD00&quot; bordercolordark=&quot;#000000&quot;>
<tr>
<td align=&quot;center&quot;><p class=&quot;text2&quot;>© Copyright 2001. All rights reserved. <br>
Contact: Runway2 </td>
</tr></table></td>
</tr></table>
</body>
</html>
Adderror
}


sub error {
print &quot;Content-type: text/html\n\n&quot;;
print <<&quot;Error&quot;;
<HTML>
<HEAD>
<TITLE>ERROR OPENING FILE</TITLE>
</HEAD>
<BODY TEXT=&quot;#000040&quot; BGCOLOR=&quot;#E0FFFF&quot; LINK=&quot;#0000DB&quot; VLINK=&quot;#0000B3&quot; ALINK=&quot;#FF0000&quot;>
<H2>Your database file could not be opened. Possible reasons are:</H2>
<OL><B>
<LI>You are missing the database file
<LI>The path to the database file is wrong
<LI>The permissions are set wrong
</B></OL>
</BODY>
<br><center><a href= target=_blank><IMG SRC=&quot; border=0 ></a><br><iframe src= space=0 vspace=0 width=468 height=60 marginwidth=0 marginheight=0 frameborder=0 scrolling=no><a href=&quot; target=_blank><img src=&quot; border=0 width=468 height=60></a> </center><br>

</HTML>
Error


sub Copyerror {
print &quot;Content-type: text/html\n\n&quot;;
print <<&quot;Copyerror&quot;;
<html>
<head>
<title>Error</title>
<link rel=&quot;stylesheet&quot; href=&quot;images/cystile.css&quot;>
<meta name=&quot;description&quot; content=&quot;Free web site design templates to jump start your new web site.&quot;>
<meta http-equiv=&quot;keywords&quot; content=&quot;free web site design template search graphic sets build web site&quot;>
<meta name=&quot;GENERATOR&quot; content=&quot;Namo WebEditor v2.00&quot;>
</head>
<body bgcolor=&quot;black&quot; text=&quot;#92BB8E&quot; link=&quot;#009900&quot; vlink=&quot;#009900&quot; alink=&quot;#009900&quot; leftmargin=&quot;0&quot; topmargin=&quot;0&quot;>

<table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;740&quot;>
<tr>
<td width=&quot;26%&quot; valign=&quot;top&quot;><table border cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;180&quot; height=&quot;60&quot; align=&quot;center&quot; bordercolorlight=&quot;#03AD00&quot; bordercolordark=&quot;#000000&quot;>
<tr>
<td><p align=&quot;center&quot;><font face=&quot;Verdana&quot; size=&quot;4&quot; color=&quot;#009900&quot;><b>Runway 2</b></font></td>
</tr></table></td>
<td width=&quot;74%&quot; valign=&quot;top&quot;><table border cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;540&quot; height=&quot;60&quot; bordercolorlight=&quot;#009900&quot; bordercolordark=&quot;#000000&quot;>
<tr>
<td><form method=&quot;get&quot; action=&quot;<input type=hidden name=&quot;scope&quot; value=&quot;web&quot;><input type=hidden name=&quot;origin&quot; value=&quot;nnnn&quot;><input type=hidden name=&quot;qSource&quot; value=&quot;n&quot;><div align=&quot;center&quot;><table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;255&quot; bgcolor=&quot;black&quot;>
<tr>
<td align=&quot;right&quot; rowspan=&quot;2&quot; bgcolor=&quot;black&quot;><p><img src=&quot; border=&quot;0&quot;></td>
<td bgcolor=&quot;black&quot;><p><img src=&quot; border=&quot;0&quot;></td>
<td align=&quot;left&quot; bgcolor=&quot;black&quot;><p><img src=&quot; border=&quot;0&quot;></td>
<td bgcolor=&quot;black&quot;><p><img src=&quot; width=&quot;1&quot; height=&quot;1&quot; border=&quot;0&quot;></td>
</tr><tr>
<td align=&quot;right&quot; colspan=&quot;2&quot; bgcolor=&quot;black&quot;><p><input type=&quot;text&quot; name=&quot;ask&quot; size=&quot;14&quot;> </td>
<td bgcolor=&quot;black&quot;><p><input type=&quot;image&quot; src=&quot; border=&quot;0&quot;></td>
</tr></form>
</table></div></td>
</tr></table></td>
</tr><tr>
<td width=&quot;26%&quot; height=&quot;426&quot; valign=&quot;top&quot;><table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;202&quot; background=&quot;images/sborg.gif&quot;>
<tr>
<td height=&quot;388&quot; valign=&quot;top&quot;><p><br>
<br>
<br>
<br>
<br>
<br>
<table border cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;104&quot; bordercolorlight=&quot;#03AD00&quot; bordercolordark=&quot;#000000&quot; align=&quot;right&quot;>
<tr>
<td class=&quot;menu&quot;><p align=&quot;center&quot;><font face=&quot;Verdana&quot; size=&quot;2&quot;><a href=&quot; target=&quot;_top&quot;>Home</a></font></td>
</tr><tr>
<td class=&quot;menu&quot;><p align=&quot;center&quot;><font face=&quot;Verdana&quot; size=&quot;2&quot;><a href=&quot; target=&quot;_top&quot;>Chat</a></font></td>
</tr><tr>
<td class=&quot;menu&quot;><p align=&quot;center&quot;><font face=&quot;Verdana&quot; size=&quot;2&quot;><a href=&quot; target=&quot;_top&quot;>Forum</a></font></td>
</tr><tr>
<td class=&quot;menu&quot;><p align=&quot;center&quot;><font face=&quot;Verdana&quot; size=&quot;2&quot;><a href=&quot; target=&quot;_top&quot;>Free For All</a></font></td>
</tr><tr>
<td class=&quot;menu&quot;><p align=&quot;center&quot;><font face=&quot;Verdana&quot; size=&quot;2&quot;><a href=&quot; target=&quot;_top&quot;>Web Design</a></font></td>
</tr><tr>
<td class=&quot;menu&quot;><p align=&quot;center&quot;><font face=&quot;Verdana&quot; size=&quot;2&quot;><a href=&quot; target=&quot;_top&quot;>Email Me</a></font></td>
</tr></table></td>
</tr></table></td>
<td width=&quot;74%&quot; height=&quot;426&quot; valign=&quot;top&quot;><table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;2&quot; height=&quot;10&quot; background=&quot;images/vline.gif&quot; align=&quot;center&quot;>
<tr>
<td><p>&nbsp;</td>
</tr></table>
<table border cellpadding=&quot;20&quot; cellspacing=&quot;0&quot; width=&quot;540&quot; bordercolorlight=&quot;#03AD00&quot; bordercolordark=&quot;#000000&quot;>
<tr>
<td height=&quot;417&quot; valign=&quot;top&quot; class=&quot;menu&quot;><p class=&quot;text&quot;><font size=&quot;3&quot;><b>Error</b></font></p>
<p class=&quot;text&quot;><font size=&quot;2&quot;><b>The site you submitted was already found in the database. You may not add the
same site twice unless its expired from the database. You maysubmit as many
different site as you like. Please go back and check your information.</b></font></td>
</tr></table></td>
</tr><tr>
<td width=&quot;26%&quot; valign=&quot;top&quot;><p>&nbsp;</td>
<td width=&quot;74%&quot; valign=&quot;top&quot;><table border cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;540&quot; bordercolorlight=&quot;#03AD00&quot; bordercolordark=&quot;#000000&quot;>
<tr>
<td align=&quot;center&quot;><p class=&quot;text2&quot;>© Copyright 2001. All rights reserved. <br>
Contact: Runway2 </td>
</tr></table></td>
</tr></table>
</body>
</html>
Copyerror
}

sub HTMLerror {
print &quot;Content-type: text/html\n\n&quot;;
print <<&quot;HTMLerror&quot;;
<html>
<head>
<title>Error</title>
<link rel=&quot;stylesheet&quot; href=&quot;images/cystile.css&quot;>
<meta name=&quot;description&quot; content=&quot;Free web site design templates to jump start your new web site.&quot;>
<meta http-equiv=&quot;keywords&quot; content=&quot;free web site design template search graphic sets build web site&quot;>
<meta name=&quot;GENERATOR&quot; content=&quot;Namo WebEditor v2.00&quot;>
</head>
<body bgcolor=&quot;black&quot; text=&quot;#92BB8E&quot; link=&quot;#009900&quot; vlink=&quot;#009900&quot; alink=&quot;#009900&quot; leftmargin=&quot;0&quot; topmargin=&quot;0&quot;>

<table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;740&quot;>
<tr>
<td width=&quot;26%&quot; valign=&quot;top&quot;><table border cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;180&quot; height=&quot;60&quot; align=&quot;center&quot; bordercolorlight=&quot;#03AD00&quot; bordercolordark=&quot;#000000&quot;>
<tr>
<td><p align=&quot;center&quot;><font face=&quot;Verdana&quot; size=&quot;4&quot; color=&quot;#009900&quot;><b>Runway 2</b></font></td>
</tr></table></td>
<td width=&quot;74%&quot; valign=&quot;top&quot;><table border cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;540&quot; height=&quot;60&quot; bordercolorlight=&quot;#009900&quot; bordercolordark=&quot;#000000&quot;>
<tr>
<td><form method=&quot;get&quot; action=&quot;<input type=hidden name=&quot;scope&quot; value=&quot;web&quot;><input type=hidden name=&quot;origin&quot; value=&quot;nnnn&quot;><input type=hidden name=&quot;qSource&quot; value=&quot;n&quot;><div align=&quot;center&quot;><table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;255&quot; bgcolor=&quot;black&quot;>
<tr>
<td align=&quot;right&quot; rowspan=&quot;2&quot; bgcolor=&quot;black&quot;><p><img src=&quot; border=&quot;0&quot;></td>
<td bgcolor=&quot;black&quot;><p><img src=&quot; border=&quot;0&quot;></td>
<td align=&quot;left&quot; bgcolor=&quot;black&quot;><p><img src=&quot; border=&quot;0&quot;></td>
<td bgcolor=&quot;black&quot;><p><img src=&quot; width=&quot;1&quot; height=&quot;1&quot; border=&quot;0&quot;></td>
</tr><tr>
<td align=&quot;right&quot; colspan=&quot;2&quot; bgcolor=&quot;black&quot;><p><input type=&quot;text&quot; name=&quot;ask&quot; size=&quot;14&quot;> </td>
<td bgcolor=&quot;black&quot;><p><input type=&quot;image&quot; src=&quot; border=&quot;0&quot;></td>
</tr></form>
</table></div></td>
</tr></table></td>
</tr><tr>
<td width=&quot;26%&quot; height=&quot;426&quot; valign=&quot;top&quot;><table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;202&quot; background=&quot;images/sborg.gif&quot;>
<tr>
<td height=&quot;388&quot; valign=&quot;top&quot;><p><br>
<br>
<br>
<br>
<br>
<br>
<table border cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;104&quot; bordercolorlight=&quot;#03AD00&quot; bordercolordark=&quot;#000000&quot; align=&quot;right&quot;>
<tr>
<td class=&quot;menu&quot;><p align=&quot;center&quot;><font face=&quot;Verdana&quot; size=&quot;2&quot;><a href=&quot; target=&quot;_top&quot;>Home</a></font></td>
</tr><tr>
<td class=&quot;menu&quot;><p align=&quot;center&quot;><font face=&quot;Verdana&quot; size=&quot;2&quot;><a href=&quot; target=&quot;_top&quot;>Chat</a></font></td>
</tr><tr>
<td class=&quot;menu&quot;><p align=&quot;center&quot;><font face=&quot;Verdana&quot; size=&quot;2&quot;><a href=&quot; target=&quot;_top&quot;>Forum</a></font></td>
</tr><tr>
<td class=&quot;menu&quot;><p align=&quot;center&quot;><font face=&quot;Verdana&quot; size=&quot;2&quot;><a href=&quot; target=&quot;_top&quot;>Free For All</a></font></td>
</tr><tr>
<td class=&quot;menu&quot;><p align=&quot;center&quot;><font face=&quot;Verdana&quot; size=&quot;2&quot;><a href=&quot; target=&quot;_top&quot;>Web Design</a></font></td>
</tr><tr>
<td class=&quot;menu&quot;><p align=&quot;center&quot;><font face=&quot;Verdana&quot; size=&quot;2&quot;><a href=&quot; target=&quot;_top&quot;>Email Me</a></font></td>
</tr></table></td>
</tr></table></td>
<td width=&quot;74%&quot; height=&quot;426&quot; valign=&quot;top&quot;><table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;2&quot; height=&quot;10&quot; background=&quot;images/vline.gif&quot; align=&quot;center&quot;>
<tr>
<td><p>&nbsp;</td>
</tr></table>
<table border cellpadding=&quot;20&quot; cellspacing=&quot;0&quot; width=&quot;540&quot; bordercolorlight=&quot;#03AD00&quot; bordercolordark=&quot;#000000&quot;>
<tr>
<td height=&quot;417&quot; valign=&quot;top&quot; class=&quot;menu&quot;><p class=&quot;text&quot;><font size=&quot;3&quot;><b>Error</b></font></p>
<p class=&quot;text&quot;><font size=&quot;2&quot;><b>The information you just submitted contained html. You may not use html in our
Free For All directory. Please go back, remove any html and re-submit your site.</b></font></td>
</tr></table></td>
</tr><tr>
<td width=&quot;26%&quot; valign=&quot;top&quot;><p>&nbsp;</td>
<td width=&quot;74%&quot; valign=&quot;top&quot;><table border cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;540&quot; bordercolorlight=&quot;#03AD00&quot; bordercolordark=&quot;#000000&quot;>
<tr>
<td align=&quot;center&quot;><p class=&quot;text2&quot;>© Copyright 2001. All rights reserved. <br>
Contact: Runway2 </td>
</tr></table></td>
</tr></table>
</body>
</html>
HTMLerror
}

exit;
}
 
Add this code:
Code:
foreach my $field (&quot;url&quot;,&quot;title&quot;,&quot;description&quot;) {
   if ( $field =~ /<.*>/ )
      htmlerror();
      exit;
   }
}
Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
foreach my $field (&quot;url&quot;,&quot;title&quot;,&quot;description&quot;) {
if ( $field =~ /<.*[red]?[/red]>/ ) {
htmlerror();
exit;
}
}

You need a '?' in the pattern or it will match from the first '<' to the last '>' and everything in between. If there is only one html tag, that is not a problem. If there are more than one, then you need the '?'.

'just a suggestion - HTH Please use descriptive titles and check the FAQs.
And, beware the evil typo.
 
Good point! Since we're not replacing tags, just checking for their existence, it probably doesn't make a lot of difference, but it's better to do it right anyway. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top