If you change the file name of the PHP file, you must change that highlighted word also.
That means, if you have renamed your file to myblogfile.php, your line 29 should look like $pagename=”myblogfile”;
About the problems when changing the username and password, please, read my previous msg, you are probably breaking the file encoding.
About the images, once you have solved the previous issues, please, tell us if the problems continue.
I hope this helps!