title: Birthday form using HTML/PHP
body: <p>I'm making a registration form which will have the user put in his birthday.
  The problem is when it comes to February and months who do not end in 31. The user is able to put something like 31 February or 31 April. Is there any practical way to display just 28 when February is selected? (aside from using Ajax)</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  &lt;form action="registration.php" method="post"&gt;
  
  &lt;p&gt;&lt;u&gt;Select table&lt;/u&gt;&lt;/p&gt;
  
  &lt;p&gt;Select date:&lt;/p&gt;
  &lt;select name="day"&gt;
  &lt;?php
  for($i=1;$i&lt;=31;$i++)
  {
      echo '&lt;option value='.$i.'&gt;'.$i.'&lt;/option&gt;';
  }
  
  
  &lt;select name="month"&gt;
  &lt;option value="January"&gt;January&lt;/option&gt;
  &lt;option value="February"&gt;February&lt;/option&gt;
  &lt;option value="Mars"&gt;Mars&lt;/option&gt;
  &lt;option value="April"&gt;April&lt;/option&gt;
  &lt;option value="May"&gt;May&lt;/option&gt;
  &lt;option value="June"&gt;June&lt;/option&gt;
  &lt;option value="July"&gt;July&lt;/option&gt;
  &lt;option value="September"&gt;September&lt;/option&gt;
  &lt;option value="October"&gt;October&lt;/option&gt;
  &lt;option value="November"&gt;November&lt;/option&gt;
  &lt;option value="December"&gt;December&lt;/option&gt;
  &lt;/select&gt;
  
  &lt;select name="year"&gt;
  &lt;?php
  for($i=2011;$i&lt;=2015;$i++)
  {
      echo '&lt;option value='.$i.'&gt;'.$i.'&lt;/option&gt;';
  }
  
  ?&gt;
  &lt;/select&gt;
  &lt;br/&gt;&lt;br/&gt;
  &lt;input type="submit" value="Submit" /&gt;
  &lt;/form&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>