title: How to make sure users can only vote once per post
body: <p>I'm building a website which has a feature which ressembles SE's voting system. I'm trying to restrict users from voting more than once per post. </p>
  
  <p>Currently, I was thinking of having a field in my <code>user</code> mysql database that would keep a list of <code>id</code>s (corresponding to posts) that the user has already voted on. Each time the user casts a vote, the array is checked against the current post's <code>id</code>. If it is found an error message is displayed, if not the vote goes through and the <code>id</code> is now part of the user's "already voted on" list.</p>
  
  <p>This seems like an odd way of doing this. Is it an efficient method? What method would be better/best?</p>