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="#E0E0E 0"
x = 2
else
bgcolor="#D0D0D 0"
x = 1
end if
%>
<td bgcolor = <%=bgcolor%> align="left">
<table><tr>
<form method="post" action="edit.as p" name="EditForm" >
<td>
<input type="hidden" name="Edit" value= "<%=rs.Fields(0 )%>" >
<input type="submit" class="modifyLi nk" name="Modify" value="Edit" />|
</td>
</form>
<form method="post" action="admin.a sp" name="DeleteFor m">
<td>
<input type="submit" class="modifyLi nk" 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
%>