hello, i want, if there is a word called sex in my website, it will replace it with *** how can i do this? what is the code for this? hope someone can help me, thnx
Are you using PHP? Or some other server side language? or do you want to do this with Javascript? Its easy enough to do though, php would probably be the better option, so it doesn't show up in the source.
if there are other words you want to censor, you can use array() function. example: $replace = "***" $censoredwords = array("sex", "word2", "word3", "word4"); foreach ($censoredwords AS $censoredword) { $mainvar = str_replace($censoredword, $replace, $mainvar); } PHP: