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/[email protected]/
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.