So this code works all day and then last night it stopped working between the last time period and I can't figure out why. Any help?
$authCheck = $_COOKIE["SecretWhom"];
$ruauth = mysql_query("SELECT auth FROM users WHERE ID = $authCheck");
$getAuth = mysql_fetch_array($ruauth);
if ($getAuth[0] == 1) {
echo "<a href='/lookupMonitor.php' class='smlink'>Dispatch</a><BR>";
// Get Vars for report counting
$now2 = date('G');
if ($now2 >= 7 && $now2 < 15) {
$shift2 = 1;
} elseif ($now2 >= 15 && $now2 < 23) {
$shift2 = 2;
} elseif ($now2 >= 23 && $now2 < 7) {
$shift2 = 3;
}
$day2 = date('Y-m-d');
if ($_COOKIE["SecretValue"] == 3 || $_COOKIE["SecretValue"] == 5) {
$getreport2 = mysql_query("SELECT ID FROM report WHERE Date = '$day2' AND Shift = $shift2")or die();
$exists2 = mysql_num_rows($getreport2);
if ($exists2 != 0) {
$report2 = mysql_fetch_array($getreport2);
$getproblems = mysql_query("SELECT count(*)as total from problem WHERE reportID = $report2[ID] AND SupRead = '0'") or die();
$countprobs = mysql_num_rows($getproblems);
if ($countprobs != 0) {
echo "<a href='reviewProblems.php?ID=$report2[ID]' class='smlink'>";
$totalprobs = mysql_fetch_array($getproblems);
echo $totalprobs[total];
echo "</a> New Problems<BR>";
} else {
echo "No Problems";
}// $countprobs
}// $exists2
}//Cookies
} //Get Auth