Copy link to clipboard
Copied
I have a simple form with a simple insert statement. I keep getting this error:
Variable 'firstname' is UNDEFINED
This is just part of my form. I only am using this part because if I can't get firstname to insert then the rest doesn't matter.
<form action="submitform.cfm" method="post">
<input type ="text" name="firstname" value="" size="25" >
</form >
That goes to this query:
<cfquery name="qinsert" datasource="name" >
INSERT INTO tablename (firstname)
VALUES ('#firstname#')
</cfquery>
I have done <cfdump> and it returned 'empty'. I can't figure out why the variables aren't passing through.
Thank you!!!
Copy link to clipboard
Copied
Are these two bits of code on the same page?
Copy link to clipboard
Copied
I will assume that the query is in the form's action page, submitform.cfm. What is then lacking is an event to submit the form. Add, for example, a submit button to the form.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more