User Guide

Table Of Contents
Querying an LDAP directory 525
<!--- Display results --->
<table border=0 cellspacing=2 cellpadding=2>
<tr>
<th colspan=4><cfoutput>#results.RecordCount# matches found</
cfoutput>
</th>
</tr>
<tr>
<th>Name</th>
<th>Department</th>
<th>E-Mail</th>
<th>Phone</th>
</tr>
<cfoutput query="results">
<tr>
<td>#cn#</td>
<td>#listFirst(ou)#</td>
<td><a href="mailto:#mail#">#mail#</a></td>
<td>#telephonenumber#</td>
</tr>
</cfoutput>
</table>
</cfif>
</body>
</html>
2.
Change the server attribute from ldap.airius.com to the name of your installation of the Airius
database.
3.
Save the page as cfldap.cfm and run it in your browser.
Reviewing the code
The following table describes the code:
Code Description
<form action="cfldap.cfm" method="POST">
<input type="text" name="name">
<br><br>
<input type="submit" value="Search">
</form>
Uses a form to get the name or name fragment
to search for.
<cfif (isdefined("form.name")
AND (form.name IS NOT ""))>
Ensures that the user has submitted the form.
This is necessary because the form page is also
the action page. Ensures that the user entered
search text.