john_6767 Posted November 15, 2006 Share Posted November 15, 2006 ok, i have people entering comments into my page in a basic forum style.. how do i stop them from ebtering swear words or replace 'rude' words with suitable ones?i figure there is a common script out there for this? Link to comment https://forums.phpfreaks.com/topic/27303-filter-language-for-text-field-input/ Share on other sites More sharing options...
The Little Guy Posted November 15, 2006 Share Posted November 15, 2006 [code]<?php$original_text = "This is a bword1 place! I hate this bword2";$bwords = array('bword1','bword2','bword3');$gwords = array('gword1','gword2','gword3');str_replace($bwords, $gwords, $original_text);?>[/code] Link to comment https://forums.phpfreaks.com/topic/27303-filter-language-for-text-field-input/#findComment-124853 Share on other sites More sharing options...
john_6767 Posted November 28, 2006 Author Share Posted November 28, 2006 ;D cheers! Link to comment https://forums.phpfreaks.com/topic/27303-filter-language-for-text-field-input/#findComment-131335 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.