I have to say, this strikes me as indicative of bad DB design:
$tbl_name = 'yourtable';
$sql="INSERT INTO $tbl_name (gamename, gamecode, region, mode, vmc, smb, hdd, usb, notes, comp)
Why does the name of the table need to be a variable? Surely you don't have more than one table with the same fields??? Or did we discuss this before?