title: How can I compare the date with today's date using UNIX timestamp values in PHP?
body: <p>I've following variable containing date in <strong>MM-DD-YYYY</strong> format. I want to compare this date with today's date. If the date containing in a variable is greater than the today's date I want to echo "Error" and if it is less than or equal to today's date I want to echo "Success".
  For this thing I <strong>don't want to use DateTime class</strong>. </p>
  
  <p>I think using UNIX Timestamp values could be a better option. If yo have any other better and efficient option you are welcome.</p>
  
  <p>Following is the variable containing date in <code>MM-D-YYYY format</code></p>
  
  <pre><code>$form_data['reg_date'] = '12-11-2014'; //This is today's date i.e. 11th December 2014
  </code></pre>
  
  <p>If the variable <code>$form_data['reg_date']</code> contains date greater than today's date(i.e. 11th December 2014) it should give error message otherwise should echo success message.</p>
  
  <p>Thanks.</p>