Hunn... just to make sure it isn´t a mysql data refresh problem, try to put your UPDATE query after the SELECTion of the username and password!