PHP-Update aktualisiert die Datenbank nicht [geschlossen]

Dies ist der Code für mein HTML-Formular:

<!DOCTYPE html>
<head>
<title> Question </title>

<style type = "text/css">

body {
font-family:cursive;
}

a:link {
text-decoration:none;
background-color:#D0D0D0;
color:#000000;
width:100px;
display:block;
text-align:center;
padding:4px;
}

a.visited {
text-decoration:none;
background-color:#D0D0D0;
color:#000000;
width:100px;
display:block;
text-align:center;
padding:4px;
}

a.active {
text-decoration:none;
background-color:#D0D0D0;
color:#000000;
width:100px;
display:block;
text-align:center;
padding:4px;
}

a:hover {
background-color:#686868;
color:#FFFFFF;
}

#title {
text-align:center;
}

</style>

</head>
<body>

<?php

session_start();

?>

<h1 id="title"> Question 1 </h1>

<br/>

<form action="q15.php" method="POST" >
<fieldset>
<legend>Who wrote the music we all recognise from the Paralympics?</legend>
<p>
<input 
type="checkbox"
value="your friend"
name="answer"
/>Your Friend
</p>

<p>
<input
type="checkbox"
value="public friend"
name="answer"
/>Public Friend
</p>

<p>
<input
type="checkbox"
value="your enemy"
name="answer"
/>Your Enemy
</p>

<p>
<input
type="checkbox"
value="public enemy"
name="answer"
/>Public Enemy
</p>

<p>
<input 
type="submit"
value="Submit"
/>
</p>
</fieldset>
</form>

</body>
</html>

und dies ist der Code für meine Seite, der die Daten verarbeitet und eine Datenbank aktualisiert, in der leere Stellen frei bleiben, um sie später (wie jetzt) ​​auszufüllen.

<body>

<h1 id="title"> Quiz </h1>

<?php

session_start();

$connection = mysql_connect("mysql15.000webhost.com", "a4987634_quiz", "********")
or die (mysql_error());

mysql_select_db("a4987634_quiz", $connection)
or die (mysql_error());

$fname = $_SESSION['fname'];
$lname = $_SESSION['lname'];
$id = $_SESSION['ID'];

$answer = $_POST['answer'];
$id = mysql_query("SELECT ID FROM users WHERE fname=$fname LIMIT 1");

if(isset($_POST['answer']) &&
$_POST['answer'] == 'public enemy')
{
?>

<h3 id = "correct"> Correct </h3>

<?php

$sqlcorrect = "UPDATE users SET q1 = correct WHERE ID = $ID LIMIT 1";

mysql_query($sqlcorrect);
(mysql_error());

}
else {

?>

<h3 id = "incorrect"> Incorrect </h3>

<?php

$sqlwrong = "UPDATE users SET q1 = 'wrong' WHERE ID = $ID LIMIT 1";

mysql_query($sqlwrong);
(mysql_error());

}

?>

</body>
</html>

Ich kann mich perfekt mit der Datenbank verbinden und es weiß, wann Sie die Frage richtig oder falsch bekommen, aber mein Problem ist, wenn Sie versuchen, die Datenbank zu aktualisieren, wird es das nicht tun. Hat jemand irgendwelche Lösungen? Es gibt auch keine Fehlermeldung. Das ergibt keinen Sinn!

Antworten auf die Frage(2)

Ihre Antwort auf die Frage