Form with variables

I wrote this while loop to cycle through all the rows in my database, and for each row, to create two things, first to echo the name of the book, and the second was to create a button next to it that when clicked, sends the BookID of that row via the post method to the the page at /scas/moreinfo.php . The first echo statement works, and states every book name on the page one after another. For some reason however the form Posts the same book id in every form i think, the value of it being the value in BookID in the last row of the database, in this case 16, so no matter what button is pressed, it sends the value 16. What have I done wrong?

while($row = mysql_fetch_array($result))
echo $row[‘BookName’] ;
echo “”;
echo “<input type=‘hidden’ name=‘BookID’ value=’” .$row[‘BookID’]. “’>”;
echo “”;
echo “

Sponsor our Newsletter | Privacy Policy | Terms of Service