I have a set of user interests which can be set by a set of checkboxes. These interests ID's are then submitted to a database, which is fine. The problem I currently have though is how do I repopulate those checkboxes on my form when the user goes to amend his profile. the code i have so far is as follows but only populates the last user interest for some reason.
Can anyoen help please
Code:
Do while not InterestRS.EOF
RegisteredInterestRS.movefirst
Do while not RegisteredInterestRS.EOF
if RegisteredInterestRS("InterestID") = InterestRS("InterestID") then
blnInterestChecked = " checked "
End if
RegisteredInterestRS.movenext
loop
%>
<%=InterestRS("Title")%><INPUT type='checkbox' name='interest' value='<%=InterestRS("InterestID")%>'<%=blnInterestChecked%> ><br>
<%
InterestRS.MoveNext
loop
Can anyoen help please