Thanks Mike. Basically I am try to select the radio button and save the value 
(1 or 0) in the table under answer_correct. I have deleted the datasource in 
the code I am submitting below.

Let me know how to be able to select the value of the radio button and save in 
a table.

Thanks.
------------------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<cfif isdefined("form.submit")>
<title>Choose Correct Answer</title>
        <cfquery name="insert_answer" datasource="">
                        insert into tbl_quiz_answers (question_id, 
answer_correct)
                        values (#url.question_id#, 1)
        </cfquery>
</cfif>
</head>
<body>
        <form name="choosecorrect" method="post" 
action="confirmation.cfm?question_id=#form.question_id#">
        <cfquery name="select_question_text" datasource="">
                        select question_text
                        from tbl_quiz_questions
                        where question_id=#url.question_id#
        </cfquery>
        <cfquery name="select_answer_text" datasource="">
                        select answer_id, answer_text
                        from tbl_quiz_answers
                        where question_id=#url.question_id#
        </cfquery>

        <h1>Review your question and choose the correct answer</h1>
        <cfoutput>The question id is : #url.question_id#</cfoutput>
        <cfoutput 
query="select_question_text"><p>Q.#question_text#</p></cfoutput>
        <p>Choose the correct answer:</p>
        <cfoutput query="select_answer_text">
                <p><input name="answer" type="radio" id="#answer_id#" 
value="y"/> answerid:#answer_id# : #answer_text#</p>
        </cfoutput>     
        <input name="submit" type="submit" value="submit" />
        </form>
</body>
</html>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192212
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to