I’ve hit a snag with the code below. I have no idea why the second one with header/location keeps giving me a blank page.
index.php
and user.php
and login.php
are all in the main folder.
The following outputs false
:
<?php
include('functions/check.php');
if (test())
{
echo "True";
}
else
{
echo "false";
}
?>
But when I try this, I get a blank page:
<?php
include('functions/check.php');
if (test())
{
header("Location: user.php");
}
else
{
header("Location: login.php");
}
?>
I tried all types of different variations:
header("Location: /login.php");