I'm having a bit of a rough time debugging a chunk of code from an application written by someone who's currently out of contact... it's a calendar-based application allowing with forms in each day, allowing people to select specific sets of options. This has been having an ongoing glitch which revolves around the date function - specifically the following block of code:
Code: Select all
$datetemp = getdate();
if ($_POST['eday'] && $month_num != $datetemp['mon']) {
$eday = $_POST['eday'];
$edayend = $_POST['edayend'];
$edayend = $edayend-$eday;
} else {
$todaytemp = $datetemp['mday'];
$weekdaytemp = $datetemp['wday'];
if ( $weekdaytemp == 0) { $todaytemp +1; }
$eday = $todaytemp+5;
$edayend = $eday+5;
while ($weekdaytemp > 1 ) {
$weekdaytemp--;
$todaytemp--;
}
}Thanks!