in the file index.php i have
Code: Select all
echo"<form method='POST' action='update.php'>";
echo"<b>Update Stats: for $player</b><br>";
echo"<input type='hidden' name='player' size='30' value='$player'>";
echo"<input type='hidden' name='person' size='30' value='$person'>";
echo"<input type='hidden' name='base_targets_destroyed' size='30' value='$base_targets_destroyed'>";
echo"<input type='hidden' name='op' value='savegame'><input type='submit' value='Update' name='B1'></form>";Code: Select all
$player = $_POSTї'player'];
$person = $_POSTї'person'];
$base_targets_destroyed = $_POSTї'base_targets_destroyed'];
$db = mysql_connect("localhost", "", "");
mysql_select_db("top50",$db);
$sql = mysql_query("UPDATE toplevels SET player='$player', person='$person', base_targets_destroyed='$base_targets_destroyed'") or die("Error: ".mysql_error());
echo"<center><b><i>Stats Updated...</i></b></center><br>";but to my knowledge i am not suppose to receive this error becuse i am UPDATING the database which replaces the old key with the new one.Error: Duplicate entry '$player' for key 1
And the interesting thing is that it works on windows and not linux.....