RSS Forums RSS
Please support our PHP advertiser: Lunarpages PHP Web Hosting

PHP Badword Filter (Intermediate)

Join Date: Apr 2007
Posts: 136
Reputation: dr4g is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 5
dr4g's Avatar
dr4g dr4g is offline Offline
Junior Poster

Re: PHP Badword Filter (Intermediate)

  #2  
Jul 24th, 2007
A better solution for yourself would be just to mask the bad words (unless you really don't want to send the email).

Just do a preg_replace of *@!>&^ (or however many characters are in the badword).

Nothing much wrong with your code though, just a few logic changes might benefit yourself.

You are not validating your mail() function either. I suggest wrapping it in an IF statement or use the @ character eg: @mail(..);

Cheers
GardCMS :: Open Source CMS :: Gardcms.org
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 5:16 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC