sample database:
[FONT=courier new]
+----+----------------------+------------+----------------------+
| ID | Weapon | Quantity | Owner |
+----+----------------------+------------+----------------------+
| 1 | Assault Rifle | 9 | johndoe |
+----+----------------------+------------+----------------------+
| 2 | Pocket Knife | 7 | alfred |
+----+----------------------+------------+----------------------+
[/FONT]
sample code:
//to insert:
$qry = mysql_query("INSERT INTO weapons(Weapon,Quantity,Owner) VALUES('$weapon','$quantity','$owner')");
//to update:
$qry = mysql_query("UPDATE weapons SET Quantity = '$quantity' WHERE Weapon = '$weapon', Owner = '$owner'");
//to delete:
$qry = mysql_query("DELETE FROM weapons WHERE Weapon = '$weapon', Owner = '$owner'");
//to read:
$qry = mysql_query("SELECT Weapon,Quantity,Owner FROM weapons");
echo "<table>";
echo "<tr><th colspan=3>weapon list</th></tr>";
while($arr = mysql_fetch_array($qry)){
echo "<tr><td>$arr[0]</td>";
echo "<td>$arr[1]</td>";
echo "<td>$arr[2]</td></tr>";
}
echo "</table>";
something like that should work i should think... hope that helps.