At the begiining of my page I have this code:
session_start();
if (!isset($_SESSION['user']) && !isset($_SESSION['lang'])){
header("Location: entry.php?baduser=1");
}
After doing some work, I try to redirect people by using:
header("Location: mainpage.php?edit=".$edit);
And then I get the infamous message:
Warning: Cannot modify header information - headers already sent by
What's going on?