I have pages which do checks and redirects somewhere whenever a condition is met or not. Now in my laptop the pages work fine but if uploaded and hosted i here it does'nt redirect which causes a lot of problems like users accessing pages which they should'nt until a condition was met.
here's a sample:
---------------------------------------------------
<?php
session_start();
if (isset($_SESSION['ID'])
{
$ID= $_SESSION['ID'];
}
else
{
header('location : Index.php');
}
?>
<body>
Hello <?php echo $ID;?>
</body>
----------------------------------------------------------
what happens is in my laptop, it will redirect if I open that page when the session was not set and will greet me if it was set. In the web host however it ignores the redirect causing me to see the page as "Hello [blank]" and never redirects. why is that? is the server's configuration different from my laptop's? is the Header() function disallowed? if so what do we use for server side redirects here?
