title: how can i set validation rules for a date of birth input
body: <p>How can I set date of birth validations for a registration form?</p>
  
  <p>I tried comparing the dob entered with the current date but it didn't work.</p>
  
  <pre><code>if (date("d/m/y") &gt; $dob){
      echo "impossible";
  }
  </code></pre>
  
  <p>or better how can i make it so that the user doesn't have the option to pick a date that hasn't come yet.</p>
  
  <p>Also how can i compare the dates to not allow someone under 12 to join my website?</p>