if (date("D") == "Mon") {
$codeArr[0] = $codeArr[0] + 1;
}
elseif (date("D") == 'Tue') {
$codeArr[1] = $codeArr[1] + 2;
}
elseif (date("D") == 'Wed') {
$codeArr[2] = $codeArr[2] + 3;
}
elseif (date("D") == 'Thu') {
$codeArr[3] = $codeArr[3] + 4;
}
elseif (date("D") == 'Fri') {
$codeArr[4] = $codeArr[4] + 5;
}
elseif (date("D") == 'Sat') {
$codeArr[5] = $codeArr[5] + 6;
}
elseif (date("D") == 'Sun') {
$codeArr[6] = $codeArr[6] + 7;
}
// bring the changed baseCode numbers back into an array
implode($codeArr);
$sumCode = array_sum($codeArr); // sum that array
if ($sumCode == $passCode) { //check sums for equality
print "Access Granted";} // do whatever once you authorize
else { print "Access Denied!"; }
}
else { //if no post is entered, print the code box
print "Enter code as integers seperated by periods.";
print "";
}
?>