</Tags><Normal Text>Add New Employees</Normal Text><Tags>



Add New Employees





name="Form.firstname" default="">
name="Form.lastname" default="">
name="Form.email" default="">
name="Form.phone" default="">
name="Form.department" default="">


"">

Please fill out the form.





employee;
employee.firstname Form.firstname;
employee.lastname Form.lastname;
employee.email Form.email;
employee.phone Form.phone;
employee.department Form.department;



First name is #StructFind(employee, "firstname")#

Last name is #StructFind(employee, "lastname")#

EMail is #StructFind(employee, "email")#

Phone is #StructFind(employee, "phone")#

Department is #StructFind(employee, "department")#




empinfo="#employee#">





action="newemployee.cfm" method="Post">
First Name: 
name="firstname" type="text" hspace="30" maxlength="30">

Last Name: 
name="lastname" type="text" hspace="30" maxlength="30">

EMail: 
name="email" type="text" hspace="30" maxlength="30">

Phone: 
name="phone" type="text" hspace="20" maxlength="20">

Department: 
name="department" type="text" hspace="30" maxlength="30">


type="Submit" value="OK">







Error. No employee data was passed.


method="ExitTag">


name="AddEmployee" datasource="cfdocexamples">
INSERT INTO Employees
(FirstName, LastName, Email, Phone, Department)
VALUES (
'#attributes.empinfo.firstname#' ,
'#attributes.empinfo.lastname#' ,
'#attributes.empinfo.email#' ,
'#attributes.empinfo.phone#' ,
'#attributes.empinfo.department#' )




Employee Add Complete




name="FtoC" access="public" returntype="numeric">
name="fahrenheit" required="yes" type="numeric" />
answer= (fahrenheit - 32)*100/180 />




fDegrees = 212 />
component="temperature" method="FtoC" returnvariable="result">
name="fahrenheit" value="#fDegrees#" />

#fDegrees#°F = #result#°C


person = CreateObject("component", "Person") />