1. Headers are already sent.
2. SESSION variables are not setting.
What you need to do just call this method with your desired parameter.
2.-> And now number second! SESSION variables are not setting means you are not getting SESSION variables from redirected page.
The solution is never forget to add “exit;” like a added here.
If you are stilling facing second problem, may you forgot to start session in that page!