I've got a problem with the header function
if ( ! isset($_SESSION['user']) ) {
header('Location: login.php');
}
There is no echo before the if, the page is empty!
it doesn't redirect me. I've var_dump();'ed something in the If statement and it worked so the if is correct.
The php version is 5.6
if-statement? 2. Do you have any kind of output before this? Headers has to be called before any output is made to the browser (whitespace, HTML-coding,echofrom PHP).