title: the most secure way of setting up a cookie for a "remember me" feature
body: <p>I am interested in coding a <code>remember me</code> feature on a login page that will record a cookie on the persons computer for how ever long.  I know there are dangers in this, so I want to make sure I do this the right way.  </p>
  
  <p>I have heard about people creating a link between a database table and the cookie itself for verification; however, not sure how to do this or if it is recommended.  I am new to cookies, so please explain the best way possible.  I don't have any examples because like I said, I have never coded this before and want to make sure I do it the right way and get input from people who have done it.</p>
  
  <p>I'm not sure if facebook's cookies last forever or not, I just know on my computer I never really have to log back in unless I delete my history.  So I'd probably want to do it similar to the way they do it.</p>
  
  <p>Thanks in advance!</p>