Wonder if you can help me with this. Has there been a change in PHP 8 which will cause issues for updating or inserting into a MYSQL table? I've looked through documentation and I can't find why code which previously worked on PHP 7 was working fine and now it doesnt work.
$sql5 = "INSERT INTO player_awards ( award, season, rank, player_id )
VALUES ('topplayer', '$season' , '1' , '$playerid' )";
if ($con->query($sql5) === TRUE) {
echo ("<div class=\"alert alert-success\" role=\"alert\"><span>Player($playerid) saved as top player for $season</span></div>");
} else {
echo "Error: " . $sql5 . "<br>" . $con->error;
}
This was working perfectly previously, now I'm presented with "Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax"
Any pointers would really help, or if there is a way around it.