Hi,I am trying to update a table with values from three other tables. This is what is happening;I have a Client, Treatment, Staff and Sale table. So when a Client buys a Treatment from a Staff member the Sale table is updated.My page that is displayed to the Client, shows the Treatment and Staff name in a drop down menu. The Staff member selects the Treatment and the Staff member who sold the treatment to the Client. However, when i click submit, only the first record from each table is added to the Sale table. Here is the code i am trying to use:
<table border="0"><tr><td width="1000" class="bluenewshead"><b>Treatment</B></TD>x<td width="1000" class="bluenewshead"><b>Staff Member</B></TD><td width="1000" class="bluenewshead"><b>Action</B></TD><tr><form name="frm" action="insert_sale_script.asp?clientID=<%= rs3("clientID")%>&staffID=<%=rs2("staffID")%>&treatmentID=<%=rs("treatmentID")%>&clientID=<%=Session("clientID")%>" method="post" ><td width="1000" class="body"><tr><td width="1000" class="body"><select name="select" id="<%=rs2("firstName")%>" value="<%=rs2("staffID")%>" ><option value="<%=rs2("staffID")%>">Please Select</option><%'while not the end of our treatment record setdo while not rs.EOF%><option value="<%= rs("treatmentID")%>"> <%Response.Write rs("treatmentName")%></option><%' Move to the next recordrs.MoveNext' LoopLoop' move back to the first recordrs.MoveFirst%><td width="1000" class="body"><select name="select" id="<%=rs2("firstName")%>" value="<%=rs2("staffID")%>" ><option value="<%=rs2("staffID")%>">Please Select</option><%'while not the end of our staff member record setdo while not rs2.EOF%><option value="<%= rs2("staffID")%>"> <%Response.Write rs2("firstName")%></option><%' Move to the next recordrs2.MoveNext' LoopLoop' move back to the first recordrs2.MoveFirst%><td width="1000" class="body"><input type="submit" value="Add" id=submit1 name=submit1></td></tr></select></table><%'end of check of obs for displayend ifrs.Closers2.Close%>
I have a Do While loop for the Treatment and the Staff member, but the update is only taking the first record set from each table. Can you help please