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:
while ($row = mysql_fetch_array($tUser_SQLselect_Query, MYSQL_ASSOC)) {
$passwordRetrieved = $row['password'];
}
this is the only place where a value may be assigned to the variable $passwordRetrieved
.
If there is no record in the result set the body of the while-loop is never executed and therefore no value ever is assigned to $passwordRetrieved
and therefore $passwordRetrieved
does not exist/is undefined at line 39 -> Notice: Undefined variable: passwordRetrieved in C:\wamp\www\loginForm.php on line 39
.