Hi,
I think there is an error in your insert statement. Extend your mysql_query to:
$result = mysql_query("...") or die("Error: ".mysql_error()."<br>\n";
The problem I see is that you selected four fields in your query for insertion but try to insert data into more than four fields.
Change your query so that it includes all fields, e.g.
$sql = <<< EOSQL
INSERT INTO stats
(name, team, pos, ab, hits,name2,team2,pos2,ab2,hits2)
VALUES
('$name','$team','$pos','$ab','$hits','$name2','$team2','$pos2','$ab2','$hits2')
EOSQL;
or
$sql = <<< EOSQL
INSERT INTO stats
(name, team, pos, ab, hits)
VALUES
('$name','$team','$pos','$ab','$hits'),
('$name2','$team2','$pos2','$ab2','$hits2')
EOSQL;
if you want to insert two rows into the table.