Time Functions with PHP (IF Statement)?

93dt

New member
Hi All,
I have been trying to work out how to make a php script that, during a certain time, displays 1 page, but outside of that time, it just shows another page.

My problem is that it continually displays "playing2.php" all the time like it is bypassing the script.

Here is what i have done...

<?php
$dayofweek = date("w");
$hour = date("G");

if( ($dayofweek = 6) && ($hour >= 19 || $hour <= 21) )
{
header("Location: playing2.php");
}
else
{
header("Location: about.php");
}

?>

During 7PM and 9PM on Saturday, "playing2.php" should show, but for the rest of the week, it should show "about.php"

Help?
 
Back
Top