I seem to be having a very simple problem but I can't wrap my head around the issue. Thanks in advance for any help you may have.
First, here is a description of the code: The following snippet of code is from a user's activity page. This snipped displays all bids that have been placed on a user's "canvas."
<table width="400" align=center frame=below>
<ul>
<?php for ($j = 0 ; $j < $numBids ; ++$j) { $cbid= mysql_fetch_row($bids); ?>
<li><strong>$<?php echo "$cbid[2]"; ?>.00 </strong> by <a href="profile.html?view=<?php echo "$cbid[4]"; ?>"><?php $name=getUser($cbid[4]); echo "$name"; ?></a>
<br/>"<?php echo "$cbid[3]"; ?>"<br/>
<p align=CENTER>
<!-- Message Artist-->
<form method="post" action="messages.html?msg=<?php echo $cbid[4]; ?>" >
<input type="submit" name="message" value="Message Artist" >
</form>
<!-- Accept Bid-->
<form method="post" action="contract.html?bid=<?php echo "$cbid[0]"; ?>" class="login-form">
<input type="submit" value="ACCEPT BID!" >
</form>
</p>
</li>
<?php } ?>
</ul>
If $numBids = 3, The html output of this code is:
<ul>
<li><strong>$150.00 </strong> by <a href="profile.html?view=169&sid=d0ba8340cdb156c233baf364960ac3e9">Artist Name</a>
<br/>"I would like to paint this in acrylic."<br/>
<p align=CENTER>
<!-- Message Artist-->
<form method="post" action="messages.html?msg=151" ><input type="hidden" name="sid" value="d0ba8340cdb156c233baf364960ac3e9" />
<input type="submit" name="message" value="Message Artist" >
</form>
<!-- Accept Bid-->
<form method="post" action="contract.html?bid=76" class="login-form"><input type="hidden" name="sid" value="d0ba8340cdb156c233baf364960ac3e9" />
<input type="submit" value="ACCEPT BID!" >
</form>
</p>
</li>
<li><strong>$150.00 </strong> by <a href="profile.html?view=169&sid=d0ba8340cdb156c233baf364960ac3e9">Artist Name</a>
<br/>"I would like to paint this in acrylic."<br/>
<p align=CENTER>
<!-- Message Artist-->
<form method="post" action="messages.html?msg=151" ><input type="hidden" name="sid" value="d0ba8340cdb156c233baf364960ac3e9" />
<input type="submit" name="message" value="Message Artist" >
</form>
<!-- Accept Bid-->
<form method="post" action="contract.html?bid=72" class="login-form"><input type="hidden" name="sid" value="d0ba8340cdb156c233baf364960ac3e9" />
<input type="submit" value="ACCEPT BID!" >
</form>
</p>
</li>
<li><strong>$150.00 </strong> by <a href="profile.html?view=169&sid=d0ba8340cdb156c233baf364960ac3e9">Artist Name</a>
<br/>"I would like to paint this in acrylic."<br/>
<p align=CENTER>
<!-- Message Artist-->
<form method="post" action="messages.html?msg=169" ><input type="hidden" name="sid" value="d0ba8340cdb156c233baf364960ac3e9" />
<input type="submit" name="message" value="Message Artist" >
</form>
<!-- Accept Bid-->
<form method="post" action="contract.html?bid=70" class="login-form"><input type="hidden" name="sid" value="d0ba8340cdb156c233baf364960ac3e9" />
<input type="submit" value="ACCEPT BID!" >
</form>
</p>
</li>
</ul>
A live test version of the page has been set up: http://www.canvasmatch.com/test/activity.html.
Now to the problem:
If a user clicks the "Message Artist" button, the user jumps to a messages page where the can send a message to the artist, obviously. This button works for all bids EXCEPT on the first one. If you were to click the first "Message Artist" button it would just refresh the page, incorrectly. However if you clicked the second "Message Artist" button it would jump to messages.html appropriately. If there were say 6 bids, all of the "Message Artist" buttons would work EXCEPT the first one.
The weird thing for me is that all "Accept Bid" buttons work, even the first one.
Has anybody experienced anything like this before? Any thoughts on what I should be looking for? Do you need the entire html file to find the problem?
I appreciate any help you can provide!
Thanks,
Jake