I got a page and as it says in the code I want to redirect all users to Google when the current time is greater than the opening time.
This is something that I want to be done on all my pages, so I put the PHP tag in the header which has all the header settings (stylesheet for instance)
$openingtime = 1264256278;
if(!$_SERVER["REQUEST_TIME"] < $openingtime){
header('www.google.dk');
}
The problem is that this doesn’t work at all.
I have no idea why this is a problem.
I have tried to echo out a string to see if the if sentence did work, and it does. I’ve used the header tag a few times before, and this hasn’t been a problem before.
You forgot the
Location:in the beginning of the header.