Home arrow ColdFusion arrow Page 3 - Cold Fusion Administration Module

Cold Fusion Administration Module

To create a user administration module in Cold Fusion, you would need to create templates that both provides a means to search for or select a user record, and updates the database using an update query. In this example, I created a form that uses a link with a URL parameter to select a user. Other methods would include a search block that would send information to a SELECT query.

Author Info:
By: Tim Haight
Rating: 4 stars4 stars4 stars4 stars4 stars / 7
March 03, 2004
  1. · Cold Fusion Administration Module
  2. · The Code for Administer.cfm
  3. · Updating the Record

print this article

Cold Fusion Administration Module - Updating the Record
(Page 3 of 3 )

After the record is changed, you can click the Update Record button, a select button with the value of Update Record.


In this example, the Address field has been updated. Here is the source code for updateuser.cfm. 

In this template, the update to the table is made by the update query in the [CFQUERY] tag. 

<cfset txtTitle="User Updated">
cfinclude template="head.txt">
CFQUERY DATASOURCE="mydb" name="qUpdateUser"
 UPDATE Users 
  SET Users
.password '#form.password#'
.lastname '#form.lastname#'
.firstname '#form.firstname#'
.address '#form.address#'
.city '#form.city#'
.state '#form.state#'
.zipcode '#form.zipcode#'
.phone '#form.phone#'
.email '#form.email#'
.rights '#form.rights#'    
   WHERE Users
.userid #form.userid# 
<br>Record Updated<br>
cfinclude template="userinclude.cfm">
cfinclude template="footer.txt">

After the update is processed, a message is displayed. I also included the userinclude.cfm so that you could update another record.

Cold Fusion


Creating a module to update records utilizes update queries, as well as selecting records using a URL parameter. A search box could also be utilized to search for the records. These techniques could be used anytime there is a need to search for and update a record from a browser.


DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

blog comments powered by Disqus

- Adobe ColdFusion Just Got More RAD
- How to Access a SQL Anywhere Database with C...
- CFXML: Probing XMLDOM in ColdFusion
- Creating a Web Service with ColdFusion: the ...
- CFAjax: What it is and How to Use it
- Querying SQL 2000 Server from ColdFusion
- Introduction to ColdFusion Markup Language, ...
- Introduction to ColdFusion Markup Language
- Databases and Dreamweaver MX 2004, concluded
- Databases and Dreamweaver MX 2004
- Welcome to Coldfusion MX 6.1, concluded
- Welcome to Coldfusion MX 6.1
- What You Must Know About ColdFusion Flow-Con...
- What You Must Know About Operators in ColdFu...
- Everything You Must Know About ColdFusion Va...

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 

Developer Shed Affiliates


© 2003-2019 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials