Click to See Complete Forum and Search --> : [RESOLVED] If Request.Form contains value


gift2women
04-25-2008, 03:24 PM
I am trying to do something that I thought would be very simple, but unfortunately my ASP skills have left the building...

I have an asp if statement that I need to return the value if the request.form value contains a value; it can be equal to or can be in the middle of the sentence.

i.e.
If Request.Form("Name") ?? "Jones" Then ...
If Request.Form("Name") ?? "Thomas" Then ...


I need the first If to do the "Then" if the input value = Jones, Jones McGee, Mike Jones, Jack Jones Smith, Thomas Jones (etc.)
I need the second If to do the "Then" if the input value = Thomas, Thomas Thomas, Tim Thomas, Thomas Jones (etc.)

How do I do this?

I have tried =, >=, =>, <> "Jones" and these do not seem to do what I want.

gift2women
04-28-2008, 11:13 AM
Figured it out for my query form (LIKE "%Jones%" Then), but this still does not work for my mailing form to only contain the information based upon the name... dangit.

gift2women
04-28-2008, 12:29 PM
If InStr(Request.Form("NAME"), "Jones") <> 0 Then