I made two scripts namely cfhttpSender.cfm and cfhttpRecv.cfm. The first script (cfhttpSender.cfm) will invoke cfhttp to post myName form field to the second script (cfhttpRecv.cfm). The second script will get form variable passed by first script and execute a query that inserts the value passed on it to a table. Anyway the purpose of inserting the value is to know if the form field is posted to the second script.
I ran it and checked the table if the form field value is added to the table and no record has been added to table. I don't know what causes this. What are the requirements or parameters in using cfhttp?
Thanks,
Edwin
The following are the codes:
cfhttpSender.cfm
<cfhttp url="cfhttpRecv.cfm" method="post">
<cfhttpparam name="myName" value="Edwin" type="FORMFIELD">
</cfhttp>
cfhttpRecv.cfm
<cfquery datasource"test">
INSERT INTO tblNames (Name) VALUES ('#form.myName#')
</cfquery>
I ran it and checked the table if the form field value is added to the table and no record has been added to table. I don't know what causes this. What are the requirements or parameters in using cfhttp?
Thanks,
Edwin
The following are the codes:
cfhttpSender.cfm
<cfhttp url="cfhttpRecv.cfm" method="post">
<cfhttpparam name="myName" value="Edwin" type="FORMFIELD">
</cfhttp>
cfhttpRecv.cfm
<cfquery datasource"test">
INSERT INTO tblNames (Name) VALUES ('#form.myName#')
</cfquery>