<h3>cfldap Example</h3>
<p>Provides an interface to LDAP directory servers. The example uses the 
University of Connecticut public LDAP server. For more public LDAP servers,
see <a href=""></a>.</p>
<p>Enter a name and search the public LDAP resource. 
An asterisk before or after the name acts as a wildcard.</p>
<!--- If exists, the form was submitted; run the query. --->
<cfif IsDefined("")>
    <!--- Check to see that there is a name listed. --->
    <cfif is not "">
        <!--- Make the LDAP query. --->
             server = ""
             action = "query"
             name = "results"
             start = "dc=uconn,dc=edu"
             filter = "cn=#name#"
             attributes = "cn,o,title,mail,telephonenumber"
             sort = "cn ASC">
        <!--- Display results. --->
        <table border = 0 cellspacing = 2 cellpadding = 2>
                <th colspan = 5>
                    <cfoutput>#results.recordCount# matches found </cfoutput></TH>
                <th><font size = "-2">Name</font></TH>
                <th><font size = "-2">Organization</font></TH>
                <th><font size = "-2">Title</font></TH>
                <th><font size = "-2">E-Mail</font></TH>
                <th><font size = "-2">Phone</font></TH>
            <cfoutput query = "results">
                    <td><font size = "-2">#cn#</font></td>
                    <td><font size = "-2">#o#</font></td>
                    <td><font size = "-2">#title#</font></td>
                    <td><font size = "-2">
                        <A href = "mailto:#mail#">#mail#</A></font></td>
                    <td><font size = "-2">#telephonenumber#</font></td>

<form action="#cgi.script_name#" method="POST">
    <p>Enter a name to search in the database.</p>
    <input type="Text" name="name">
    <input type="Submit" value="Search" name="">