I am trying to make an rpg another one I might add. I have a basic script that adds the right loot items and prices and descriptions. It has a post form to submit but when I do it only sells the first itme in the list and not the one that is checked with a radio button any help?
<img src="images/inventory.jpg" alt="" />
<table width="100%" cellpadding="1" cellspacing="0" border="2">
<tr colspan="7">
<td>Slot</td><td>Item</td><td>Level<td>Power</td><td>Sell Price</td><td>Sell Item</td><td>Wear Item</td>
<?php
// include char files and loot files
include "php/db/db_config.php";
// create variables from db and loot
$username = $_SESSION['username'];
$player_id = $account_info['player_id'];
// select from loot db
$result = mysqli_query($my_database,"SELECT * FROM inventory WHERE username = '$username'") or die (mysqli_error($my_database));
//$counter = 0;
while ($row = mysqli_fetch_assoc($result)) {
echo '<tr>';
echo '<td>';
//$counter++;
//echo $counter;
echo '</td>';
echo '<td>';
echo $row['item'];
echo '</td>';
echo '<td>';
echo $row['level'];
echo '</td>';
echo '<td>';
echo $row['power'];
echo '</td>';
echo '<td>';
echo $row['sell_price'];
$row['sell_price'];
echo '</td>';
echo '<td>';
echo '<form action="index2.php?content=sell_item" method="post">';
echo '<input type="radio" name="id">';
echo '<input type="submit" value="Sell This Item">';
echo '</form>';
echo '</td>';
echo '<td>';
echo '<form action="loot/wear_item.php" method="post">';
echo '<input type="hidden" name="two">';
echo '<input type="submit" value="Wear This Item">';
echo '</form>';
echo '</td>';
echo '</tr>';
}
?>
</table>