brincobb
-
Posts
2 -
Joined
-
Last visited
Posts posted by brincobb
-
-
Here' my html code
<tr><td class="easdwnunder" style="width: 40%;">DATE OF BIRTH:</td><td class="dwnunder2" style="width: 40%;"><div style="width: 100%;"><?phpif($newproblem && !$printing){?><?php echo date_dropdown($this->row->date_of_birth); ?><?php}else{echo safe_out($this->row->date_of_birth);}?></div></td></tr>And here's my dropdown functionfunction date_dropdown($year_limit = 0){$html_output = ' <div id="date_select" >'."\n";$html_output .= ' <label for="date_day"></label>'."\n";/*days*/$html_output .= ' <select name="date_day" id="day_select">'."\n";for ($day = 1; $day <= 31; $day++) {$html_output .= ' <option>' . $day . '</option>'."\n";}$html_output .= ' </select>'."\n";/*months*/$html_output .= ' <select name="date_month" id="month_select" >'."\n";$months = array("", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");for ($month = 1; $month <= 12; $month++) {$html_output .= ' <option value="' . $month . '">' . $months[$month] . '</option>'."\n";}$html_output .= ' </select>'."\n";/*years*/$html_output .= ' <select name="date_year" id="year_select">'."\n";for ($year = 1900; $year <= (date("Y") - $year_limit); $year++) {$html_output .= ' <option>' . $year . '</option>'."\n";}$html_output .= ' </select>'."\n";$html_output .= ' </div>'."\n";$date_of_birth = $day ."-". $month ."-". $year;return $html_output;}
My dropdown date of birth does not insert to db
in Application Design
Posted
im using mysql database and here are fields in the table.