Re: [Djulia] Notice: CMS Builder v1.14 released!
That's getting into custom programming but here's some code snippets that might help you:
// error on short words
$word = "hello";
if (strlen($word) <= 2) { die("Word is too short!"); }
// error on banned words
$word = "often";
$bannedWords = array('at','the','of');
if (in_array(strtolower($word), $bannedWords)) { die("Word '" .htmlspecialchars($word). "' is not allowed!"); }
// remove banned words from array
$bannedWords = array('at','the','of');
$myWords = array('red','blue','the','green');
$myWords = array_diff($myWords, $bannedWords);
// show what's left in array
print "<xmp>";
print_r($myWords);
print "</xmp>";
You'd still need to write logic for cases such as when the only words users searched for were ignored or banned and what to do in that case.
Hope that helps!
Dave Edis - Senior Developer
interactivetools.com