Stupid Problem... on comparing variables!
I `ve got this f***** prob the last 30 minutes. And my head is total stuck!!!
So please... tell me... What`s wrong???
------------------------------
<%
Dim oRSbn, pecode, code
pecode = Request.Querystring("code")
Set oRSbn=server.createobject("ADODB.recordset")
sqltext = " SELECT * from choices ;"
oRSbn.open sqltext, "DSN=anthem"
oRSbn.MoveFirst
Do while NOT oRSbn.eof
code = oRSbn("code")
if (code=pecode) then
%>
<tr><td width='100%'><%=oRSbn("choice")%></td></tr>
<%
else
%>
<tr><td width='100%'><a target="_top" href="main.asp?code=<%=code%>"><%= oRSbn("choice")%></a></td></tr>
<%
end if
oRSbn.movenext
loop
oRSbn.Close
Set oRSbn=nothing
%>
-----------------------
info: the value from the Response.querystring is coming OK!
I guess the problem is on "if (code=pecode) then"
cause when I tried e.g. "if (code="4") then" it worked fine!!!
:(
|