34534534534555
IS-IT--Management
Hello,
I have generated the following code, which displays a list of records from a mysql database, and makes the auctionid field the hyperlink.
The problem i am trying to solve, and hope you will be able to, is how to pass the auctionid to the bid page which all the hyperlinks point to?
Thanks in Advance
| Feedback is always appreciated as this will help to further our knowledge as well |
I have generated the following code, which displays a list of records from a mysql database, and makes the auctionid field the hyperlink.
Code:
<?php
include("dbconnect.php");
$sql = "SELECT auction.auctionid, auction.bookcondition, book.edition, bid.bidprice
FROM auction, book
LEFT JOIN bid ON auction.auctionid=bid.auctionid
WHERE sellerusername <> '$username'
AND auction.isbn = book.isbn";
$query = mysql_query($sql) or die("Cannot query the database: " . mysql_error());
echo "<table width=500 border=1 cellspacing=0 cellpadding=0>";
echo "<tr><td width=75 align=left>Auction</td><td width=100 align=left>Book Condition</td><td width=100 align=left>Book Edition</td>
<td width=100 align=left>Current Price</td></tr>";
while ($myrow = mysql_fetch_array($query))
{
$auctionid = $myrow["auctionid"];
$bookcondition = $myrow["bookcondition"];
$bookedition = $myrow["edition"];
$bidprice = $myrow["bidprice"];
echo
"<tr>
<td width=100 align=left><a href=bid.php>$auctionid</a></td>
<td width=100 align=left>$bookcondition</td>
<td width=100 align=left>$bookedition</td>
<td width=100 align=left>$bidprice</td>
</tr>";
}
mysql_free_result($booktitles);
?>
The problem i am trying to solve, and hope you will be able to, is how to pass the auctionid to the bid page which all the hyperlinks point to?
Thanks in Advance
| Feedback is always appreciated as this will help to further our knowledge as well |