View comments | RSS feed
Contents > CFML Reference > ColdFusion Functions > StructNew PreviousNext

StructNew

Creates a structure.

A structure.

Structure functions

StructNew()

Structure functions

None

<!--- Shows StructNew. Calls CF_ADDEMPLOYEE, which uses the |
addemployee.cfm file to add employee record to database. ---> <h1>Add New Employees</h1> <cfparam name = "FORM.firstname" default = ""> <cfparam name = "FORM.lastname" default = ""> <cfparam name = "FORM.email" default = ""> <cfparam name = "FORM.phone" default = ""> <cfparam name = "FORM.department" default = ""> <cfif FORM.firstname EQ ""> <p>Please fill out the form. <cfelse> <cfoutput> <cfscript> employee = StructNew(); StructInsert(employee, "firstname", FORM.firstname); StructInsert(employee, "lastname", FORM.lastname); StructInsert(employee, "email", FORM.email); StructInsert(employee, "phone", FORM.phone); StructInsert(employee, "department", FORM.department); </cfscript> <p>First name is #StructFind(employee, "firstname")# <p>Last name is #StructFind(employee, "lastname")# <p>EMail is #StructFind(employee, "email")# <p>Phone is #StructFind(employee, "phone")# <p>Department is #StructFind(employee, "department")# </cfoutput> <!--- Call the custom tag that adds employees ---> <CF_ADDEMPLOYEE EMPINFO = "#employee#"> </cfif>

Contents > CFML Reference > ColdFusion Functions > StructNew PreviousNext

ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting

Version 6.1

Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.

Comments


sanaullah said on Oct 16, 2003 at 7:44 AM :
very old example of coldfusion4.5 , atleast people now about new dynamic example or show how pass the struct to array as well as these are possible in practically.

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funca103.htm