title: Comparing date time todays date against date created
body: <p>I'm stuck, been reading several places regarding comparing date and date time, but still can't figure out how to do it, anyone that could be so kind to help me out?</p>
  
  <p>Thing is that I'm building a membership database and when the user register an account, it inserts date time to SQL, and that membership only last 1 year.
  So the user has access to the page 1 year from the user registered.</p>
  
  <p>Found this when reading, but not sure how I can check if the user still has access from the user registered. (365 days)</p>
  
  <pre><code>$today = date("Y-m-d H:i:s");
  $expire = $isCreated; //from db
  
  $today_time = strtotime($today);
  $isCreated_time = strtotime($isCreated);
  
  if ($isCreated_time &lt; $today_time) { 
  /* has access*/ 
  } else { 
  /* no access */ 
  }
  </code></pre>
  
  <p>Thank's for all help or point in right way.</p>