Thanks for the replies.... Ok.. I have 8 groups of questions. I'll post
a sample of one group below. Depending on who logs in, will depend on
how many groups of questions they will get. Once they check either the
yes or no radio button for each question, the will submit the form. I
will need to know how many questions there are, then loop through those
questions and input them into the db. for example( if two of the
questions were "the sky is blue" and "the ocean is green".. One record
will be created for the first question, and another record will be
created for the second question). I also need to know if any answers
were answered yes, but that is a separate issue. Right now, I just need
to know how to do this part... Here is a sample of the questions. These
are being stored in a questions table in the db.
-------------------------------------------------
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<th noWrap>
<div align="center"><span class="style3">Coronary Artery Disease
</span></div></th>
<th><span class="style3">YES</span></th>
<th><span class="style3">NO</span></th></tr>
<tr>
<td noWrap width="69%"><span class="style3">Have you ever received a
diagnosis of heart disease or coronary artery disease?</span></td>
<td width="6%">
<div align="center">
<input type="radio" value="yes" name="CAD_1" /> </div></td>
<td width="6%">
<div align="center">
<input type="radio" value="no" name="CAD_1" /> </div></td></tr>
<tr>
<td class="style3" noWrap>Have you ever had a heart attack?</td>
<td>
<div align="center">
<input type="radio" value="yes" name="CAD_2" /> </div></td>
<td>
<div align="center">
<input type="radio" value="no" name="CAD_2" /> </div></td></tr>
<tr>
<td class="style3" noWrap>Have you ever been treated for a blocked atery
anywhere in your body? </td>
<td>
<div align="center">
<input type="radio" value="yes" name="CAD_3" /> </div></td>
<td>
<div align="center">
<input type="radio" value="no" name="CAD_3" /> </div></td></tr>
<tr>
<td class="style3" noWrap><span class="style4">Have you ever been
treated for chest pain caused by blockage of arteries in your heart?
</span></td>
<td>
<div align="center">
<input type="radio" value="yes" name="CAD_4" /> </div></td>
<td>
<div align="center">
<input type="radio" value="no" name="CAD_4" /> </div></td></tr>
<tr>
<td class="style3" noWrap><span class="style4">Have you ever had an
abnormal exercise tolerance test (ETT, stress test) </span></td>
<td>
<div align="center">
<input type="radio" value="yes" name="CAD_5" /> </div></td>
<td>
<div align="center">
<input type="radio" value="no" name="CAD_5" />
</div></td></tr></tbody></table>
-------------------------------------------------
I am just querying the db and grabbing the appropriate groups.. The
names of the radios are important too, per the customers request.
Another group would be CHF_1,CHF_2, etc.. If anyone knows a better way
of doing this, I'll be glad to hear it... Let me know if you need
anymore detail..