You are here: filter bad words,list recent 10 « PHP Programming Language « IT news, forums, messages
filter bad words,list recent 10

Posted by joanna on 11/01/07 10:32

Okay, my snippet goes hand in hand it is supposed to not show bad
words that were searched for and it is supposed to show the 10 most
recent searches. Here's my problem, it is only showing the 10th row as
far as recent searches and the filtering of bad words doesn't work.

$query=@mysql_query("SELECT search,recent FROM search
ORDER BY recent ASC LIMIT 0,10 ");

while($row = mysql_fetch_array( $query ))
{

$badWords = array('stupid', 'Jerk');
$numBadWords = count($badWords);

for($i="0";$i<$numBadWords;$i++){
if(stripos($ss_mess,$badWords[$i]) != FALSE){

}
}

$recent=($row['search']);
}

echo $recent;

I should note that search is both a field and the name of the table (i
know not the best design) and the field "recent" is timestamp type.

 

Navigation:

[Reply to this 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

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