|  | Posted by Jeff North on 11/17/06 07:18 
On Fri, 17 Nov 2006 02:10:55 -0000, in alt.php "linda"<n0spamF0rme@tiscali.co.uk>
 <455d1ab4$1_3@mk-nntp-2.news.uk.tiscali.com> wrote:
 
 >| Ok, I have another question!  How can I get the year to run from 2006 back
 >| to
 >| 1945?
 >|
 >| Many thanks in advance as always,
 >| Linda
 >|
 >| // This function makes three pull down menus for day, month and year.
 >|
 >| function date_of_birth(){
 >|
 >|  //Make the days pull down
 >|
 >|  echo '<select name="day">';
 >|  for ($day = 1; $day <= 31; $day++) {
 >|   echo "<option value=\"$day\">$day</option>\n";
 >|  }
 >|  echo '</select>';
 >|
 >|
 >|  //Make the months
 >|
 >|  $months = array (1 => 'January', 'Febuary', 'March', 'April', 'May',
 >| 'June', 'July', 'August', 'September', 'October', 'November', 'December');
 >|
 >|  //Make the months pull down.
 >|  echo '<select name="month">';
 >|
 >|  foreach ($months as $key => $value){
 >|   echo "<option value=\"$key\">$value</option>\n";
 >|  }
 >|  echo '</select>';
 >|
 >|
 >|  //Make the years
 >|
 >|  echo '<select name="year">';
 >|  for ($year = 1945; $year <= 2006; $year++) {
 
 for ($year=2006; $year>=1945; $year--) {
 
 >|   echo "<option value=\"$year\">$year</option>\n";
 >|  }
 >|  echo '</select>';
 >|
 >|
 >| }//End of date of birth function.
 >|
 >|
 ---------------------------------------------------------------
 jnorthau@yourpantsyahoo.com.au  : Remove your pants to reply
 ---------------------------------------------------------------
  Navigation: [Reply to this message] |