As the others have stated, the cause of the error is the second session_start()
you are using. However, the actual reason it's throwing an error is because you are trying to set a header after you've already sent output. Since the session_start() function sets the session cookie, it tried to set the cookie header, which is after you already echo content.