Hello,
Need your help to create a php validation for bad words..i tried the code below but i can't make it work, i am able to submit the form:
Thank you
Need your help to create a php validation for bad words..i tried the code below but i can't make it work, i am able to submit the form:
Code:
$badWords = array('bad word1','bad word2','bad word3');
$text = '{tablename___element_name}';
foreach($badWords as $bad) {
if(in_array($bad, $text)) {
return false;
} else {
return true;
}
}
Thank you