Butch Walker - 2012-06-12 19:16:46
I am lost again need the experts...
(I can't believe I can't find something like this a novice can rewrite into his code)
I have a simple form that searches a concordance:
<form method="post" action="result.php" name="keysearch" >
<h3>Enter single word at least 3 characters long.</h3>
<input type="text" name="search" value="" size="40" /><br />
<input type="submit" value="Display Results" />
</form>
==================================
First part, I need to stop people from searching on anything less than 3 characters long and no spaces (i.e. 2+ words) in the search box.
Second part, I need to make sure that the following list is not allowed, something like:
$forbidden_word="she"||"they"||"them";
# if $forbidden_word matches the submitted word
if($_POST['keysearch']==$forbidden_word)
{
$message='The word: '.$forbiden_word.' is not allowed;
}
else
SEND FORM