PHP - Undefined variable

后端 未结 9 758
星月不相逢
星月不相逢 2021-01-26 05:29

I\'m doing some exercises from Beginners PHP & MySQL by Mr. Tucker.

On his example everything works fine, but on my PC there is an error:

9条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-26 06:09

    If your query returned no results, then $passwordRetrieved is undefined (just like the message says).

    You should throw an error when you couldn't find any users with username=$username (which is also an invalid login).

提交回复
热议问题