Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 470

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Accessing and Using Data
<cfelseif Form.action is "Retrieve">
<cfldap name="GetEntry"
server=#myServer#
action="query"
attributes="cn,sn,mail,telephonenumber,uid"
scope="subtree"
filter="uid=#Trim(Form.UID)#"
start="o=Airius.com">
<cfset fullNameValue = GetEntry.cn[1]>
<cfset surnameValue = GetEntry.sn[1]>
<cfset emailValue = GetEntry.mail[1]>
<cfset phoneValue = GetEntry.telephonenumber[1]>
<cfset uidValue = GetEntry.uid[1]>
<cfelseif Form.action is "Delete">
<cfldap action="delete"
dn="uid=#Trim(Form.UID)#, ou=People, o=Airius.com"
server=#myServer#
username=#myUserName#
password=#myPassword#>
<cfoutput><h3>Entry for User ID #Form.UID# has been deleted
</h3></cfoutput>
3
At the end of the code for the Add button (the
end tag.
</td>
After the end of the Add button
4
&nbsp
<input type="Submit"
name="action"
value="Retrieve"
tabindex="7">
&nbsp
<input type="Submit"
name="action"
value="Delete"
tabindex="8"></td>
5
Save the file and run it in your browser.
Reviewing the code
The following table describes the code:
tag with
input
tag, add the following code:
input
Last updated 1/20/2012
at the bottom of the form
Value=Add
465
, delete the
)

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents