Problems with patterns
| From: | Phpu | Date: | Thu, 22 Apr 2004 00:28:37 +0000 |
| Subject: | Problems with patterns | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-184167@lists.php.net to get a copy of this message | ||
Hi,
i have a script that searches a database after a specific word.
this function check the entered word
function valid_word($word) {
if(ereg("^[a-zA-Z0-9_]{3,15}$", $word)) {
return true;
} else {
return false;
}
}
If i search for a word is ok but when i searches for a phrase it returns no result.
What do i have to modify the function?
Thank you for your reply