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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

check that variable contains key word 1

Status
Not open for further replies.

Jami

Programmer
Jul 18, 2000
54
US
Hi all,

I am hoping to check that a form variable contains a key word, such as bracelet. This form variable can be any of the following:
"and Gold Bracelet"
"and Diamond Bracelet"
"and Diamond Pendant"

I would like certain script to execute if the word bracelet is contained in the variable. I have coded something along the lines of the following (although this doesn't work.. This is sql scripting, need CFML format):

<cfif #trim(lcase(form.jewelry_type))# is like &quot;%bracelet%&quot;>

Thanks!!
Jami
 

Case Sensative
<CFIF Find(&quot;bracelet&quot;,form.jewelry_type)>
Execute Code
</CFIF>

Not Case Sensative
<CFIF FindNoCase(&quot;bracelet&quot;,form.jewelry_type)>
Execute Code
</CFIF>
- tleish
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top