Hi experts,
I have searched answers for my problem but takes a while to find out. So I post here hoping to get some answers
I have a website where people can register company names
I have to do some checking for the words before they submit. The reserved words are stored in database and I have to check whether the words entered by the user is not a resticted word(s)
For eg:
Money Exchange, Change, Trust, ABC Bank, A B C Bank are reserved words
if the user enters Money Exchange it's an error
if the user enters Exchange it's not an error
if the user enters Trust it's an error
if the user enters Trustee it's not an error
I could loop through the resticted words records and check whether the whole word exist in the user entered value strpos
===========
But the problem is if the user enters Trustee it comes as error even though Trustee is not restrcited where as Trust is restricted
If split the user entered words as array then I cannot check because some of the resticted words are more then one word but when we split the user enterd words to array by space it stores single word in each row. So I could not check.
Also I have a restricted word A B C BANK
- If the user enters A B C BANK and I split this into array it is splitted as 4 rows which I cannot check against the restricted word
===========
I don't know how to do this. Help me plsssss
Thanks
Ahmad
Hong Kong