title: How to prevent user from altering the id on inspect element in Chrome
body: <p>I am just wondering how to prevent user from altering the id on inspect element in Chrome before submitting the result on database. On my website, I created a like button, this button has its own ID such as below (id='1'). Once this button is click, I use ajax to send data on my database and update the columns with the same ID that I passed from ajax. However, if a user change this ID on inspect element in Chrome before submitting the data, they can manipulate my database, and instead of liking the comment with an id=1 they can like other comments, that should not be likable. Is there anyway to prevent this from happening. </p>
  
  <pre><code>&lt;input type="button" value="Like" id="1"/&gt;
  
  $('#button').click(function() {
      var id = $(this).attr('id');
  
      $('like_ajax.php', {id: id}, function(data) {
          alert('Success');
      });
  
  });
  </code></pre>