Ok, I made this so it would list the items a person owns that they are selling to be displayed so they can update their shops price.
When i put a new price inside of the form box, and click update, it always says it did it, but nothing ever gets updated. Could someone please take alook at this code, and tell me what you think may be wrong.
Thanks.
//Inventory stuff
if ($view == inventory) {
print "Your inventory";
print "<table><tr><td width=50><b><u>Name</td><td width=100><b><u>Desc</td><td><b><u>Options</td></tr>";
include("language/item.php");
$esel = mysql_query("select * from equipment where status='S' and owner=$stat[id]");
while ($equip = mysql_fetch_array($esel)) {
print "<tr>
<td><img src=\"images/items/".$equip['name'].".gif\"></td>
<td><b>".$equip['name']."</b> <br>Price: $equip[price]<br>".$desc[$equip['name']]." </td>
<td><a href=\"item.php?remove=$equip[id]\">Remove</a><br>
<form method=post action=shop.php?view=inventory&id=$equip[id]&step=price>
<input type=text value=$equip[price] name=np>
<input type=submit value=Update>
</td>
</tr>";
}
print "</table>";
}
if ($step == price) {
{
$sql = "UPDATE equipment SET price='" .$np. "' WHERE id=$equip[id] and owner=$stat[id]";
mysql_query("$sql");
print "You have updated your $equip[name] from $equip[price] to $np. ";
}
}
?>