[eluser]LuckyFella73[/eluser]
You get the error because you echo out / send data to be rendered
before you try to alter session data. You can only alter/ set
session data before the first output. You wouldn't get the
problem when following the mvc principle