Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Asp script contains word

Status
Not open for further replies.

tjbradford

Technical User
Dec 14, 2007
229
GB
I want to filter out words that are marked as undesirable

I have the following working (see attachment)

----------------------------------------------

this means i can block a user or more by adding and UserID<>"is-banned-2"

but i want to ban content of the sDetails if it contained a naughty word for the example i will use "sausages"

I was thinking of putting another if statment directly above the if UserID<> ( see attachment )

i have placed what i am after below the current setup again (see attachment) but i'm unsure of how todo a contains statement.


 
You mean something like:
Code:
If InStr(sDetails, "sausages") Then
   UserID = "is-banned-2" 
End If
If UserID <> "is-banned-2" Then
'
'
'
End If

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top