Home  >  Q&A  >  body text

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>
P粉781235689P粉781235689466 days ago449

reply all(1)I'll reply

  • P粉378890106

    P粉3788901062023-08-03 10:01:00

    The mysqli_connect object must be returned from konesti.php, and the connection must be carefully checked to see if it is normal. Usually, this error is caused by missing objects.

    reply
    0
  • Cancelreply