i've pulled data into a recordset. now i have a loop that loops through the recordset. if it finds a particular value, it should show a table with some data. if it doesn't find this value it shows another table with some images. here is my code for one section (this section is repeated 4 times).
my problem is that BOTH pieces of my code show up. they can't both be true. what am i doing wrong? thanks.
<%
rs.movefirst
do while not rs.eof
if rs("itemNumber") = "112233" and rs("paymentStatus") = "Completed" then
%>
<td colspan="1" class="description" width="60" height="25" valign="top"><p>Item sold2233</p></td>
<td class="description" width="160" height="25" valign="top"></td>
<%
elseif rs("itemNumber") <> "112233" then
%>
<td colspan="1" class="payButtons" width="60" height="25" valign="top">
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="
[email protected]">
<input type="hidden" name="item_name" value="Dragon">
<input type="hidden" name="item_number" value="112233">
<input type="hidden" name="amount" value=".01">
<input type="hidden" name="return" value="http://www.scrapmenagerie.com/asp/ipn.asp">
<input type="hidden" name="cancel_return" value="http://www.scrapmenagerie.com/sorry.asp">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="image" src="http://www.scrapmenagerie.com/pageImages/buyButton.gif" border="0" align="left" name="submit" alt="Make payments with PayPal - it's fast, free and 2233!">
<input type="hidden" name="add" value="1">
</form>
</td>
<td class="payButtons" width="160" height="25" valign="top">
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="
[email protected]">
<input type="image" src="http://www.scrapmenagerie.com/pageImages/viewCartButton.gif" border="0" align="left" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<input type="hidden" name="display" value="1">
</form>
</td>
<%
else
end if
rs.movenext
loop
%>