I have check boxes next to each item when I call up the items from mySQL . How do i make the item disappear in the mySQL database when i user ticks the box and clicks "sell item"? I've been having trouble on that ..
<html>
<body>
<p><a href="index2.php">Index</a> | <a href="shop.php">Shop</a> | <a href="sell.php">Sell</a> | <a href="logout.php">Logout</a>
</p>
</p>
<?php
session_start();
$checked = $_POST['checked'];
if(isset($_SESSION['otherusername'])){
$db=mysql_connect('localhost', 'root', '');
$res=mysql_select_db('txtgame',$db) or die(mysql_error());
$otherusername = $_SESSION['otherusername']; //"SELECT item FROM users_items WHERE username='".$Username."'";
$res=mysql_query($otherusername)or die(mysql_error());
while($row = mysql_fetch_assoc($res)){
echo ' <input type="checkbox" name="item[]" value="items" />'. ' '.$row['item']."<BR />";
}
}else{
echo "Sorry your not a member please join us!";
}
?>
<br><input type="submit" value="sellitem">
</form>
</body>
</html>
Thanks !