Solved

Best way for Editing Details?

Posted on 2004-08-03
3
162 Views
Last Modified: 2013-12-24
Hi all,

I have a MS SQL Server table with my customers and wish to be able to edit their details with ColdFusion.

What are the best steps for this page(s) and what are the functions I should be using? What are the functions for?

Thanks in advance
0
Comment
Question by:samsung_81
3 Comments
 
LVL 17

Accepted Solution

by:
anandkp earned 300 total points
ID: 11701957
Steps wld be :

1. Select teh data in the table & show the user
<cfquery name="Qry_User" Datasource="DSNName">
    select name, lastname, email from tbl_customer where name = 'samsung' <!--- use CFQueryParam for all ur queries - helps caching & better security --->
</cfquery>

2. Show teh data in a tabular format to the user - so he can decide if he needs to edit
<cfoutput Query="Qry_User">
       #name# - #lastname# - #email#
</cfoutput>

3. when the user clicks on EDIT - again use steps 1 & 2 to show him the data - but this time in a EDITABLE format - ie with the use of TextBoxes & Form Controls.

4. the user can edit teh details [U'll need Javascript to make sure that the edits are as per the (Project/DB) requirements] by submitting the form.

5. On submit - have server validations take care of teh inputs by the user & make sure they are as per the (Project/DB) requirements. once confirmed

<CFQuery DataSource="DSNName">
    Update tbl_customer
    set    lastname = '#Form.lastname#',
            email      = '#form.email#'
    where user = 'samsung'
</CfQuery>

that shld get u started ...
0
 
LVL 35

Expert Comment

by:mrichmon
ID: 11705895
More info :

Besides what anadkp said....

You should have the users access this page over SSL and have to log in first.

Be sure to use server side validation of the submitted fields with things like regular expressions to ensure they are entering allowable data
(If you need help let us know)
0
 
LVL 1

Author Comment

by:samsung_81
ID: 11724873
thanks anandkp

but can you give some more details on steps 2-4?

im guessing from step 2 and 3, i can use the listed customer as a link with an URL variable to the "edit customer" page. correct?

with step 4, what functions other than javascript are available within coldfusion for me to edit that customer's details in a form-like view?

Thanks again
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
The purpose of this video is to demonstrate how to connect a WordPress website to Google Analytics. This will be demonstrated using a Windows 8 PC Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php :…
The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question