I have read through the php manual for this problem and it seems quite a common issue but i have yet to find a solution. I am saving sessions in a database. My code is as f
I know this is an old toppic but I found the solution (for me). I've put a exit after the header.
$_SESSION['session'] = 'this is a session'; header('location: apage.php'); exit;
This works for me