I guys, i'm having a problem with a loop, i'm going to put the code for you to see it, it's all working just great, however there's one thing that's driving crazy, i can't get the loop to work on the idfields of the DB, i want to pass the id for the next page in order to use it in the query but i have 6 recordsd on the DB and the id that's passed is always the first one, can someone help me?
<%
Dim idOpin
idOpin = opin("idopiniao"
Dim lastarticle
lastarticle = ""
do while not opin.EOF
If opin("idopiniao"
<> lastarticle Then %>
<table width=450 border=1>
<tr>
<td bgcolor=#3399cc width=400>
<b><%=opin("titulo"
%></b>
</td>
<td bgcolor=#3399cc>
<font size=2><a href="comt.asp?ID=<%=idOpin%>" class="link">Comentar</a></font>
</td>
<br>
</tr>
<tr>
<td bgcolor=#dbf1ff colspan=2>
<!--#include file="splitopin.asp" -->
</td>
</tr>
</table>
<% End If %>
<table border=1>
<% If opin("idcoment"
<> "" Then %>
<tr>
<td width=440>
<font color=#3399cc> <i><!--#include file="splitcom.asp" --></i></font>
</td>
</tr>
<% Else %>
<tr>
<td bgcolor=#3399cc width=383>
<b><%=opin("titulo"
%></b>
</td>
<td bgcolor=#3399cc>
<font size=2><a href="comt.asp?ID=<%=idOpin%>" class="link">Comentar</a></font>
</td>
<br>
</tr>
<td colspan=2 bgcolor=#dbf1ff>
<%=opin("opiniao"
%>
</td>
</tr>
<tr>
<td>
<font color="red"> <i>Sem comentários</i><br></font>
</td>
</tr>
<% End If %>
</table>
<% lastarticle = opin("idopiniao"
opin.MoveNext
loop
%>
Thanks in advance
Herminio, Portugal
<%
Dim idOpin
idOpin = opin("idopiniao"
Dim lastarticle
lastarticle = ""
do while not opin.EOF
If opin("idopiniao"
<table width=450 border=1>
<tr>
<td bgcolor=#3399cc width=400>
<b><%=opin("titulo"
</td>
<td bgcolor=#3399cc>
<font size=2><a href="comt.asp?ID=<%=idOpin%>" class="link">Comentar</a></font>
</td>
<br>
</tr>
<tr>
<td bgcolor=#dbf1ff colspan=2>
<!--#include file="splitopin.asp" -->
</td>
</tr>
</table>
<% End If %>
<table border=1>
<% If opin("idcoment"
<tr>
<td width=440>
<font color=#3399cc> <i><!--#include file="splitcom.asp" --></i></font>
</td>
</tr>
<% Else %>
<tr>
<td bgcolor=#3399cc width=383>
<b><%=opin("titulo"
</td>
<td bgcolor=#3399cc>
<font size=2><a href="comt.asp?ID=<%=idOpin%>" class="link">Comentar</a></font>
</td>
<br>
</tr>
<td colspan=2 bgcolor=#dbf1ff>
<%=opin("opiniao"
</td>
</tr>
<tr>
<td>
<font color="red"> <i>Sem comentários</i><br></font>
</td>
</tr>
<% End If %>
</table>
<% lastarticle = opin("idopiniao"
opin.MoveNext
loop
%>
Thanks in advance
Herminio, Portugal