I have made the edit for you. Anyway, the problem is that you forgot to end your string literal with a double quote on this line:
$deleteinventory = @mssql_query("DELETE FROM [INVENTORY_TBL] WHERE m_idPlayer='$getvalid';
You might want to use a text editor with syntax highlighting as it would allow you to more easily detect these kinds of mistakes. Furthermore, although it is good that you posted code in code tags, it would be even better to post PHP code in [noparse]
[/noparse] bbcode tags. You should also indent your code properly.