Solved

Best way for Editing Details?

Posted on 2004-08-03
3
173 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
This guide will walk you through the essential considerations and tech stack for building scalable websites. Know how to grow your business the smart way!
The purpose of this video is to demonstrate how to create a Printer Friendly PDF on a WordPress Page. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome Screenshot” Google Chrome Extension, and SmallPDF.com Log…
The purpose of this video is to demonstrate how to make a WordPress Site faster and smaller in size by cleaning up the database. This will be demonstrated using a Windows 8 PC. Plugin WP Optimize will be used. Go to your WordPress login page. T…

756 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