Here's what I have on my display page
On my action page I have:
What I believe I have to do is write a loop for the action page to check and make sure data is being passed through on those input fields and if so, update the table. If not, exclude it. If this doesn't make sense, let me know. Thanks guys.
rojas1mg - - - I love Tek-Tips and all members who reply.
Code:
<cfloop from="1" to="10" index="Register">
<tr>
<!---Enter name (Last, First)--->
<td><input type="text" name="name#register#" size="45"></td>
<!---Rank--->
<td><select name="rank#register#">
<cfoutput query="rank">
<option value="#Rank_ID#">#Rank#</option>
</cfoutput></select></td>
<!---Enter SSAN--->
<td><input type="Text" name="SSN#register#" size="15"></td>
<!---Enter e-mail address--->
<td><input type="Text" name="email#register#" value="@varich.ang.af.mil" size="30"></td>
<!---Select Unit--->
<td><select name="Unit_ID#register#">
<cfoutput query="dp_unit">
<option value="#Unit_ID#">#Unit#</option>
</cfoutput></select></td>
<!---Select Refresher Class Dated--->
<td><cfoutput query="class">#Course_Date#</cfoutput></td>
</tr>
</cfloop>
On my action page I have:
Code:
<cfquery datasource="#dsource#">
INSERT INTO tbl_roster(name, Rank_ID, SSN, email, Unit_ID, Course_ID)
VALUES('#form.name#', #form.Rank#, #form.ssn#,'#form.email#', #form.unit_ID#, #form.course_id#)
</cfquery>
What I believe I have to do is write a loop for the action page to check and make sure data is being passed through on those input fields and if so, update the table. If not, exclude it. If this doesn't make sense, let me know. Thanks guys.
rojas1mg - - - I love Tek-Tips and all members who reply.