64
</FORM>
</CFOUTPUT>
</BODY>
</HTML>
3.
Save the page. as
4.
View
Code Review
Code
<CFQUERY NAME="GetRecordtoUpdate"
DATASOURCE="CompanyInfo">
SELECT *
FROM Employees
WHERE Employee_ID = #URL.Employee_ID#
</CFQUERY>
<CFOUTPUT QUERY="GetRecordtoUpdate">
<FORM ACTION="EmployeeUpdate.cfm" METHOD="Post">
<INPUT TYPE="Hidden" NAME="Employee_ID"
VALUE="#Employee_ID#"><BR>
First Name: <INPUT TYPE="text" NAME="FirstName"
VALUE="#FirstName#"><BR>
Last Name: <INPUT TYPE="text" NAME="LastName"
VALUE="#LastName#"><BR>
Department Number: <INPUT TYPE="text"
NAME="Department_ID" VALUE="#Department_ID#"><BR>
Start Date: <INPUT TYPE="text" NAME="StartDate"
VALUE="#StartDate#"><BR>
Salary: <INPUT TYPE="text" NAME="Salary"
VALUE="#Salary#"><BR>
Contractor: <INPUT TYPE="checkbox" name="Contract"
value="Yes" checked>Yes<BR><BR>
<INPUT TYPE="Submit" VALUE="Update Information">
</FORM>
</CFOUTPUT>
<INPUT TYPE="Submit" VALUE="Update Information">
updatedorm.cfm
in a browser.
updateform.cfm
Developing Web Applications with ColdFusion
.
Description
Query the CompanyInfo
datasource and return the records
in which the employee ID matches
what was entered in the URL.
Display the results of the
GetRecordtoUpdate query.
Create a form whose variables will
be process on the
EmployeeUpdate.cfm action page.
Use a hidden input field to pass the
employee ID to the action page.
Populate the fields of the update
form.
Need help?
Do you have a question about the COLDFUSION 4.5-DEVELOPING WEB and is the answer not in the manual?
Questions and answers