Reply to making a list to ban Guest Book entries.

Your name:

Reply:


Posted by joboils on 10/10/44 11:50

Hello. I am trying to write a code to filter entries (porn and
medical, etc) in my guest book. The words will come in the $comments
field.
This is the file that handles the data coming from the guestbook.php
screen. I don't know how to make it work properly. Any help would be
appreciated. Thank you.

$TableName="banned_words";
$Query="SELECT * FROM $TableName";
$Result=mysql_db_query ($DBName, $Query, $Link);
while ($Row=mysql_fetch_array ($Result))
{
$banned_words[]=$Row[banned_word];
}
$banned_word_count=count($banned_words);

$i=0;
// now loop through the list of banned words ;
for ($i=0; $i<=$banned_word_count; $i++)
{
// to check if the banned word is in the comments ;
if (strstr($banned_words[$i], $comments) !=0)
{
header("location:guestbook.php");
exit();
}
}

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация