Hi,
I sent a string with GET from an HTML form page to a separate PHP file. The player-id came accross correctly(by looking at the URL). When I want to use its values to update the record in the table, it does not complain, but the the update is ignored. I also picked up, by echoeing the player-id that it add a "1" to the value. For example player_id = 4 came across via the URL but display player_id = 41 when the script runs. Any suggestions?
Language: PHP
<?PHP
$db_handle = mysql_connect($server, $user_name, $password);
$db_found = mysql_select_db($database, $db_handle);
if ($db_found) {
$SQL = "UPDATE playerinfo SET name = ';$_GET[name]';, surname = ';$_GET[surname]';, contactnumber = ';$_GET[contactnumber]';, email = ';$_GET[email]';, position = ';$_GET[position]';, username = ';$_GET[username]';, password = ';$_GET[password]'; WHERE player_id = ';$_GET[player_id]';";
$result = mysql_query($SQL);
$SQL = "SELECT * FROM player_info";
$result = mysql_query($SQL);
while ($db_field = mysql_fetch_assoc($result)) {
print $db_field[';player_id';] "<BR>";
print $db_field[';name';] "<BR>";
print $db_field[';surname';] "<BR>";
print $db_field[';contactnumber';] "<BR>";
print $db_field[';email';]"<BR>";
print $db_field[';position';]"<BR>";
print $db_field[';username';]"<BR>";
print $db_field[';password';]"<BR>";
}
}
else{
die(mysql_error());}
?>