http://www.igearonline.com/subscribe/admin.asp
I have an html table that is loaded with database records. I have edit
and delete options inside the table that edit or delete a given row.
They all work fine except for the very first Edit option (the one that
corresponds to the first row of data). Can anyone help me out. I have
provided part of my code below.
<%
Do Until rs.EOF
%>
<tr>
<% Dim x, bgcolor
if x = 1 then
bgcolor="#E0E0E0"
x = 2
else
bgcolor="#D0D0D0"
x = 1
end if
%>
<td bgcolor = <%=bgcolor%> align="left">
<table><tr>
<form method="post" action="edit.asp" name="EditForm">
<td>
<input type="hidden" name="Edit" value= "<%=rs.Fields(0)%>" >
<input type="submit" class="modifyLink" name="Modify" value="Edit" />|
</td>
</form>
<form method="post" action="admin.asp" name="DeleteForm">
<td>
<input type="submit" class="modifyLink" name="Modify" value="Delete"
onclick="return confirm('Are you sure you want to delete this
record?')" />
<input type="hidden" name="Delete" value= "<%=rs.Fields(6)%>" >
</td>
</form>
</tr></table>
</td>
<td bgcolor = "black"></td>
<td bgcolor = <%=bgcolor%> name="name"> <%=rs.Fields(1)%>,
<%=rs.Fields(2)%>
</td>
<td bgcolor = "black"></td>
<td bgcolor = <%=bgcolor%> name="company"> <%=rs.Fields(7)%></td>
<td bgcolor = "black"></td>
<td bgcolor = <%=bgcolor%> name="email"> <%=rs.Fields(6)%></td>
<td bgcolor = "black"></td>
<td bgcolor = <%=bgcolor%> name="phone"> <%=rs.Fields(4)%></td>
</tr>
<%
rs.MoveNext
Loop
%>