Here is the whole top portion of the code
<?php
$db = mysql_connect("localhost", "domain", "password");
mysql_select_db("mydb",$db);
if ($player_id) {
if ($submit) {
$sql = "UPDATE players SET position='$position', team_id='$team_id', photo='$photo' WHERE player_id=$player_id";
$result = mysql_query($sql);
echo "Thank you! Information updated.\n";
} else {
// query the DB
$sql = "SELECT * FROM players WHERE player_id=$player_id";
$result = mysql_query($sql);
$myrow = mysql_fetch_array($result);
?>
Of course I have replaced the words domain and password for my domain and password.
I am sure it is not a connection thing. I was getting errors like that before when I forgot to put in the correct password.