I have moved my project from XAMPP to docker container and somehow my header() don't work anymore.
if (isset($_SESSION['username'])) {
if ($_SESSION['username'] == "oszi") {
header("Location: ./sites/adminAccount.php");
} else {
header("Location: ./sites/account.php");
}
}
this part of my code checks for the usesrname in sessions. it works and want's redirect me to site/adminAccount.php but then gives me an error:
Warning: Cannot modify header information - headers already sent by
it worked fine with XAMPP but doesn't work with docker