Code: Select all
function dropdown($value, $section, $name) {
$days = range(0, 31);
$months = array("zero", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
$now = getDate();
$year = $now['year'];
$year = $year - 13;
$last = $year - 20;
$last = mktime(12, 0, 0, 1, 1, $last);
$last = date("Y", $last);
$years = range($last, $year);
$genders = array("something", "Male", "Female");
$return = null;
For($i = 1 ; $i < count(${$section}); $i++):
If(${$section}[$i] == $value):
$return .= <<< SEL
<option selected="selected" value="$i">{${$section}[$i]}</option>
SEL;
Else:
$return .= <<< OPT
<option value="$i">{${$section}[$i]}</option>
OPT;
EndIf;
EndFor;
$return = <<< RET
<select name="$name">$return
</select>
RET;
return $return;
}And one more thing, why is it looping 3 times? I can't seem to spot that either. Getting back, if it's like this, then no one above the age of 33 can use my script if they were on a windows server?
Warning: mktime(): Windows does not support negative values for this function in c:\appserv\www\nlogger\includes\functions.php on line 211
Warning: date(): Windows does not support dates prior to midnight (00:00:00), January 1, 1970 in c:\appserv\www\nlogger\includes\functions.php on line 212
Warning: mktime(): Windows does not support negative values for this function in c:\appserv\www\nlogger\includes\functions.php on line 211
Warning: date(): Windows does not support dates prior to midnight (00:00:00), January 1, 1970 in c:\appserv\www\nlogger\includes\functions.php on line 212
Warning: mktime(): Windows does not support negative values for this function in c:\appserv\www\nlogger\includes\functions.php on line 211
Warning: date(): Windows does not support dates prior to midnight (00:00:00), January 1, 1970 in c:\appserv\www\nlogger\includes\functions.php on line 212
Warning: mktime(): Windows does not support negative values for this function in c:\appserv\www\nlogger\includes\functions.php on line 211
Warning: date(): Windows does not support dates prior to midnight (00:00:00), January 1, 1970 in c:\appserv\www\nlogger\includes\functions.php on line 212
There's got to be a way, right?
-Nay