In PHP, an unexpected variable $sql caused an exception error.
<p>I thought I had just written the complete code with no errors, but why does it keep showing errors like this? I've tried starting with basic issues like checking for semicolons, I've also tried renaming the $sql variable, and even rewriting the code on line 28, without success. Here is a screenshot of the code. I'm sorry about the image quality issue. This is an error message from Index.php. </p>