I made a little quiz with PHP and MySQL. When the quiz is finished, the user receives this:
<p>
Final Score:<?php echo $_SESSION['Score']; ?>
</p>
Then, I also wanted to put all the results in a table, so I tried this:
$sql = "INSERT INTO `Results` (Username, Score) VALUES ('$username', $score)";
But I don't know how to put this $_SESSION['Score'] = $score
to insert the result into the table.