I think dagon was saying YIKES! And to avoid having his head spin off his shoulders he made a quick post and ran outside to scream. :p Ok he probably didn't do that, but I am almost positive I heard a large number of heads simultaneously hitting keyboards right about the time you posted. 😃
if ($row != mysql_fetch_array($result))
{
echo "You need at least 5 coins to buy this item.";
}
if($row <= mysql_fetch_array($sql))
{
$row=("DELETE FROM `userslogin` WHERE `coins`= '" . $coins . "')";
$row=("INSERT INTO `userslogin` (weapons) VALUES ('$_POST[weapon]')";
if (!mysql_query($sql,$con))
Explain what each of those lines is doing. Not what you want them to do but what they are doing???
I assure you it is a far cry from what you want. Basically what dagon said is what is happening.
There are several fundamental mistakes, and you just need to read up on working with queries, you can start at [man]mysql_query[/man] in the php manual.
Even now I can't believe what I am looking at. Having seen bits an piece of the project you are working on and based on the complexity level of such a project I can not believe you have made it this far and not understand the fundamentals that makes the above code so egregiously messed up.
I think its time to end my post and go outside and scream, just joking.