Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Best way for Editing Details?

Posted on 2004-08-03
3
Medium Priority
?
196 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 900 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

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

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

When setting up new project requests for our site, one of the most powerful tools our team has available to use is Axure (http://www.axure.com/). It’s a tool for creating software and web prototypes that can function and interact as if it were the a…
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
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…
The purpose of this video is to demonstrate how to integrate Mailchimp with Facebook. This will be demonstrated using a Windows 8 PC. Mailchimp and Facebook will be used. Log into your Mailchimp account. : Click on your name. Go to Account Setti…
Suggested Courses

783 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