sorry think my code got a bit mixed uo, here are the 2 files
values passed thru
<CFQUERY NAME="GetPollDetails" DATASOURCE="quickpoll">
SELECT pol_ID, pol_Question, pol_Category, pol_Status
FROM pol_Poll
WHERE pol_ID = #URL.PollID#
</CFQUERY>
<CFQUERY NAME="GetAnswers" DATASOURCE="quickpoll">
SELECT ans_ID,ans_Ans
FROM ans_Answer A
WHERE ans_pol_ID = #url.PollID#
</CFQUERY>
<!-- Display HTML FORM Here with values filled -->
<cfoutput query="getpolldetails">
<form method="POST" action="Poll_update.cfm">
<!--- <textarea rows="5" name="MainText" cols="45"> --->
<input type="hidden" name="pol_id" value="#pol_id#">
<p> </p><p>Poll: <input type="Text" textarea rows="5" cols="45"
name="pol_question" size=40 value="#pol_question#">
</cfoutput>
<CFLOOP QUERY="GetAnswers">
<input type="hidden" name="ans_id#GetAnswers.CurrentRow#"
value="#GetAnswers.ans_id#">
<cfoutput><p>Answer #GetAnswers.CurrentRow#:
<input type="text" name="answer#GetAnswers.CurrentRow#" size="45"
value="#GetAnswers.ans_Ans#">
</cfoutput>
</CFLOOP>
and then update
<cfquery name="update_Poll" datasource="quickpoll">
UPDATE pol_poll
SET pol_question = '#Trim(pol_question)#'
WHERE pol_id = #pol_id#
</cfquery>
<CFQUERY DATASOURCE ="quickPoll" NAME ="addanswer">
UPDATE ans_answer
set answer1='#form.ans_answer1#'
</CFQUERY>
<CFQUERY DATASOURCE ="quickPoll" NAME ="addanswer">
UPDATE ans_answer
set answer2='#form.ans_answer2#'
</CFQUERY>
<CFQUERY DATASOURCE ="quickPoll" NAME ="addanswer">
UPDATE ans_answer
set answer3='#form.ans_answer3#'
</CFQUERY>
<CFQUERY DATASOURCE ="quickPoll" NAME ="addanswer">
UPDATE ans_answer
set answer4='#form.ans_answer4#'
</CFQUERY>
<CFQUERY DATASOURCE ="quickPoll" NAME ="addanswer">
UPDATE ans_answer
set answer5='#form.ans_answer5#'
</CFQUERY>
any help greatly appreciated
>From: "janey smith" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: need help urgent
>Date: Fri, 14 Jul 2000 12:46:32 GMT
>
>I know this is probably an easy one but my head is wrecked,
>basically my uodate form is acting up . my dataentry form is fine passes
>the
>vars ok,
>
>
>
><!-- Display HTML FORM Here with values filled -->
>
>
><form method="POST" action="Poll_update.cfm">
>
><input type="hidden" name="pol_id" value="183">
><p> </p><p>Poll: <input type="Text" textarea rows="5" cols="45"
>name="pol_question" size=40 value="What is your favourite colour?">
>
>
>
><input type="hidden" name="ans_id#GetAnswers.CurrentRow#"
>value="#GetAnswers.ans_id#">
><p>Answer 1:
> <input type="text" name="answer1" size="45"
>value="red">
>
>
>
>here is my update page, i now it's really messy but please help, any other
>attempts i've made just add another entry to the db, leaving the existing
>one still in the db
>
><cfset pagetitle = "Update Poll">
>
><cfoutput>
><html>
><head>
><title>#pagetitle#</title>
></head>
>
><body bgcolor="FFFFCC" link="996633" vlink="CC9966" alink="CC9966">
>
> ><b>#pagetitle#</b></font>
>
></cfoutput>
><!--- <cfupdate datasource="quickpoll" tablename="pol_poll"> --->
><!--- <cfupdate datasource="quickpoll" tablename="ans_answer"> --->
>
><!--- <cfquery name="qryGetID" datasource="quickpoll">
> SELECT @@identity as pol_id
> </cfquery> --->
>
><!--- <cfoutput query="qryGetID">
>#pol_id#
></cfoutput> --->
>
> <cfquery name="update_Poll" datasource="quickpoll">
> UPDATE pol_poll
> SET pol_question = '#Trim(pol_question)#'
> WHERE pol_id = #pol_id#
> </cfquery>
><CFQUERY DATASOURCE ="quickPoll" NAME ="addanswer">
> UPDATE ans_answer
> set answer1='#form.ans_answer1#'
></CFQUERY>
>
>
><CFQUERY DATASOURCE ="quickPoll" NAME ="addanswer">
> UPDATE ans_answer
> set answer2='#form.ans_answer2#'
></CFQUERY>
>
><CFQUERY DATASOURCE ="quickPoll" NAME ="addanswer">
> UPDATE ans_answer
> set answer3='#form.ans_answer3#'
></CFQUERY>
>
><CFQUERY DATASOURCE ="quickPoll" NAME ="addanswer">
> UPDATE ans_answer
> set answer4='#form.ans_answer4#'
></CFQUERY>
><CFQUERY DATASOURCE ="quickPoll" NAME ="addanswer">
> UPDATE ans_answer
> set answer5='#form.ans_answer5#'
></CFQUERY>
> poll updated
> <P><BR><P>
>
>
>
><p> <br> <br></p>
></body>
></html>
>
>
><input type="hidden" name="ans_id#GetAnswers.CurrentRow#"
>value="#GetAnswers.ans_id#">
><p>Answer 2:
> <input type="text" name="answer2" size="45"
>value="blue">
>
>
><input type="hidden" name="ans_id#GetAnswers.CurrentRow#"
>value="#GetAnswers.ans_id#">
><p>Answer 3:
> <input type="text" name="answer3" size="45"
>value="green">
>
>
><input type="hidden" name="ans_id#GetAnswers.CurrentRow#"
>value="#GetAnswers.ans_id#">
><p>Answer 4:
> <input type="text" name="answer4" size="45"
>value=" ">
>
>
><input type="hidden" name="ans_id#GetAnswers.CurrentRow#"
>value="#GetAnswers.ans_id#">
><p>Answer 5:
> <input type="text" name="answer5" size="45"
>value=" ">
>
>
>
>
><p>Status:
> <select name="pol_status" size="1">
> <option value="All">All</option>
> <option value="New">New</option>
> <option value="Active">Active</option>
> <option value="Archive">Archive</option>
> <option value="Hide">Hide</option>
> </select>
> Category:
> <select name="pol_category" size="1">
> <option value="All">All</option>
> <option value="sports">sports</option>
> <option value="current affairs">current affairs</option>
> <option value="general">General</option>
> </select>
>
> <INPUT name=polltype type=radio value=Y>
> Yes/No
> <INPUT name=polltype type=radio value=M>
> Multiple Choice </p>
><p>
> <input type="submit" value="Update Poll" name="submit"></form>
> </p>
><p> <br> <br></p>
></body>
></html>
>
>
>________________________________________________________________________
>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
>
>------------------------------------------------------------------------------
>Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
>To Unsubscribe visit
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
>send a message to [EMAIL PROTECTED] with 'unsubscribe' in
>the body.
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.