You will need to build an LDAP filter string based off of your criteria in the form.
First Name = givenName Last Name = sn Telephone Number = telephoneNumber E-Mail = mail Address = physicalDeliveryOfficeName Department = department Then, you need to decide if these will be OR'ed or AND'ed together. A sample LDAP "AND" filter: filter="(&(givenName=#form.firstName#)(sn=#form.lastName#))" A sample LDAP "OR" filter: filter="(|(givenName=#form.firstName#)(sn=#form.lastName#))" You might search for LDAP filter examples to see how you can AND and OR both together. M!ke -----Original Message----- From: Ian Vaughan [mailto:[EMAIL PROTECTED] Sent: Thursday, January 26, 2006 8:19 AM To: CF-Talk Subject: Coldfusion and Active Directory Hi I am trying to create an Employee Directory searching against the information stored in Active Directory. I would like to be able to search against the following information stored in the AD. First Name Last Name Telephone Number E-Mail Address Department What would I need to add to my code below to get this working ? This is my search form <cfform method="POST" action="adsearch.cfm" name="search"> <cfinput type="text" name="firstname" size=22 ><br> <cfinput type="text" name="lastname" size=22 ><br> <cfinput type="text" name="telephonenumber" size=22 ><br> <cfinput type="text" name="email" size=22 ><br> <cfinput type="text" name="address" size=22 ><br> <cfinput type="text" name="department" size=22 ><br> <input type="image" src="search.gif <http://intranet.neath-porttalbot.gov.uk/images/intranethomepage/search. gif> " border="0" style="cursor:hand" width="49" height="18"> </cfform> My adsearch.cfm page <cfldap action="query" name="adresult" attributes="firstname,lastname,telephonenumber,email,address,department" start="cn=users,dc=neath-porttalbot,dc=gov.uk" filter="(&(objectclass=user)" server="nptgcs.neath-porttalbot.gov.uk" > <cfoutput query="query"> #firstname# #lastname# <br> #Telephonenumber# #email# <br> #address# #department' <br> <br> <hr> <br> </cfoutput> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:230476 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

