If the record does not get deleted then there can be two things wrong:
The record does not exist
You didn't reference the right record.
is unlikely because you suppy the itemnumber in a previous script (I assume)
Is very likely.
Make sure the query is correct by printing it before you execute it, a bit like:
<?
$sQuery = "DELETE FROM table WHERE itemcode = ".$_POST['item_code'];
echo $sQuery;
?>
Ofcourse this is only for when you use a form. If you use a URL to send the itemnumber, then you should use $GET instead of $POST.
You can always use the contents of $POST and $GET directly, you never have to copy the value to a new var or anything.
All vars you send through the URL end up in $GET, and all vars you send through a form end up in the $POST array.