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:
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).