For inserting the remarks into the DB simply 
suffix your textarea variable with the ID number
or some unique value that would indicate the 
record they are putting the remarks to.

Example:


-----Original Message-----
From: han peng [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 13, 2001 5:32 AM
To: CF-Talk
Subject: cfloop for 2 list?!!!

<form action="page2.cfm" method="post"> 
  <cfloop query="part_info"> 
    <textarea cols="20" rows="2"
name="p_arrival_remarks">#p_arrival_remarks#</textarea>
    <input type="hidden" name="p_username" value="#part_info.p_username#">
    <input type="hidden" name="ID" value="#part_info.part_info_ID#">
   </cfloop>
 <input type="submit" value="Submit" >
</form>  

ON PAGE2.CFM
IF INSERTING INTO A NEW TABLE:
<cfquery name=insremarks datasource=blahblahblah>
insert into remarksTable(remark_id,Username,remarks)
values(#form.ID#,'#form.p_username#','#form.p_arrivale_remarks#')
</cfquery>

IF UPDATING THE TABLE WITH THE REMARKS
<cfquery name=updateremarks datasource=blahblahblah>
        UPDATE remarksTable
        Set Remarks = '#form.P-arrival_remarks#'
        Where Part_info_ID = #form.ID#
</cfquery>

This UPDATE is assuming you have a UNIQUE Identifier within
the table. Else you will have to determine the unique record by some 
means of combining fields.




hi.. i hav a prob. here. i hav a tool to key in remarks for mulitple users. 
Eg. Page1.cfm

 <form action="page2.cfm" method="post"> 
  <cfloop query="part_info"> 
    <textarea cols="20" rows="2"
name="p_arrival_remarks">#p_arrival_remarks#</textarea>
    <input type="hidden" name="p_username" value="#part_info.p_username#">
  </cfloop>
 <input type="submit" value="Submit" >
</form>  

So in page2.cfm...
how can i insert the remarks into the database using the respective
username.??

i cant use <cfloop INDEX="test" LIST="??!!"> 
as it can only use for 1 list...

another prob.. i try CFOUTPUT the 2 list... #p_username#,#p_arrival_remarks#
and notice that if theres no input for remarks.. both list length doesnt
match.. 

any advice how i shld go abt doing it?!!

thanx in advance,
han
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to