mysql_query("insert into `r_cupgame` set `rez1`='".$m['sc1']."', `rez2`='".$m['sc2']."', `pen1`='".$m['pen1']."', `pen2`='".$m['pen2']."', `id_report`='".$m['id']."' where `id`='".$id."';") or die(mysql_error());
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where `id`='12'' at line 1