query('UPDATE '.$db->prefix.'inventory SET quantity=quantity-1 WHERE item_id='.$iid.' AND user_id='.$pun_user['id'].' LIMIT 1') or error('Unable to throw away', __FILE__, __LINE__, $db->error()); redirect('http://'.$_SERVER['http_host'].$_SERVER['REQUEST_URI'], 'You have thrown away your '.$cur_item['item_name']); exit; } ?>

Your inventory

query('SELECT inv.item_id, inv.quantity, it.item_name, it.item_rarity, it.item_image FROM '.$db->prefix.'inventory AS inv INNER JOIN '.$db->prefix.'items AS it ON (it.item_id=inv.item_id) WHERE user_id='.$pun_user['id'].' ORDER BY item_name') or error('Unable to fetch item list', __FILE__, __LINE__, $db->error()); while ($cur_item = $db->fetch_assoc($result)) { ?>
Image Item Name Rarity Quantity Owned Actions
<?php echo pun_htmlspecialchars($cur_item['item_name']) ?>