Hi everyone, I've been messing around with coldfusion lately, and I'm having a rough time understanding how to update a database with the values of a form. I have some understanding of SQL, and it seems to me like I shouldnt have too much trouble with this, but I am. The way I have it now is;
Thats the update part, and the url is going through, but i always get the error "Element FIRSTNAME is unidentified in FORM".
I'm assuming that its a object oriented kinda thing like javascript. like document.form.v alue. Is that right, or is there some other meaning? What is the point of putting "form." in there is kinda what im getting at.
Thanks,
Scotter
Code:
<CFIF IsDefined("URL.Do")>
<CFIF #URL.Do# IS "save">
<CFQUERY DATASOURCE="scottersNew" NAME="allEmployeeQuery">
UPDATE employees, employeeInfo
SET firstName='#form.firstName#',
lastName='#form.lastName#',
phone='#form.age#',
idNumber='#form.idNumber#'
WHERE idNumber='#URL.ID#'
</CFQUERY>
</cfif>
</cfif>
I'm assuming that its a object oriented kinda thing like javascript. like document.form.v alue. Is that right, or is there some other meaning? What is the point of putting "form." in there is kinda what im getting at.
Thanks,
Scotter
Comment