Please, $error and $user assignments should be "joined". No newline here. I really don't like what you did here also because there's no newline after $error=false line.