Place your code above the last } so like this and give it a try....
item_remove($userid, $r['inv_itemid'], 1);
}
if($r['itmname'] == 'Weed')
{
mysql_query("UPDATE users SET brave=brave+10 WHERE userid=$userid",$c);
print "You roll a fat blunt full of {$r['itmname']} and start to hit it. You feel a bit more focused.";
}
}
$h->endpage();