the error messages are showing because you left blank space between php code blocks when you pasted the error code I gave, make sure there are no blank lines or spaces between the error code and the next php code block.
can you send a backup of the users table from your database please.