Dark_Wizard
01-23-2002, 12:41 AM
I am trying to figure out why my dropdown box is off by 6 hours. Here is the code I have:
$i = '0';
while ($i < '28'){
$timestamp = mktime(0,0,0,date('m'),date('d') + $i,date('Y'));
$date = date('M d',$timestamp);
echo ("<OPTION value=\"$timestamp\">$date\n");
$i++;
}
echo ("</SELECT></td></tr>\n");
echo ("<td align=right>Time: </td><td><SELECT name=\"timeid\">\n");
$i = '0';
while ($i < '48'){
$timestamp = $i * 1800;
$time = date('g:i A',$timestamp + 82800);
if ($time == "19:00") {
echo ("<OPTION selected value=\"$timestamp\">$time\n");
}
else {
echo ("<OPTION value=\"$timestamp\">$time\n");
}
$i++;
}
Any help would be appreciated....TIA!
$i = '0';
while ($i < '28'){
$timestamp = mktime(0,0,0,date('m'),date('d') + $i,date('Y'));
$date = date('M d',$timestamp);
echo ("<OPTION value=\"$timestamp\">$date\n");
$i++;
}
echo ("</SELECT></td></tr>\n");
echo ("<td align=right>Time: </td><td><SELECT name=\"timeid\">\n");
$i = '0';
while ($i < '48'){
$timestamp = $i * 1800;
$time = date('g:i A',$timestamp + 82800);
if ($time == "19:00") {
echo ("<OPTION selected value=\"$timestamp\">$time\n");
}
else {
echo ("<OPTION value=\"$timestamp\">$time\n");
}
$i++;
}
Any help would be appreciated....TIA!