Thank you -- I figured the errors were something silly like that.
I have deleted the spaces between all the php lines on my pages, so now I don't get any errors, but after entering valid login credentials on the page login it returns to the login page, with no redirect to the results page. And I try to go to the results page, it redirects to the login page. So I am stuck on the login.