first thing, you cannot put arrays into strings.
So
CODE$id1=mysql_fetch_array(mysql_query ("select * from players where
id=$stat[id]"));
Should be:
CODE$id1=mysql_fetch_array(mysql_query("SELECT * FROM `players` WHERE
`id`='".$stat[id]."'"));
Also, PHP will think that change and buy are constants.
This:
CODEif($action2==change)
if($act ion==buy)
should be:
CODEif($action2 == "change")
if($...



