title: Developing An "Add To Favourites" Button In PHP
body: <p>I'm creating a small website using PHP which is generally a site for showcasing the products of a certain shop. The site has the functions where a user can create his/her account, log in and then he/she should be able to favor add any product they like to their own wish list. Then the favored products should be displayed when they view their wish list (that can be managed). </p>
  
  <p>I'm looking for a way where if a user click on the favourite button on a product, then the product should be favored without the page getting reloaded. I know we should use AJAX but how? </p>
  
  <p>The websites I've given below have that feature I'm trying to explain (but they require to sign up though).</p>
  
  <p><a href="https://www.etsy.com/" rel="nofollow">example one</a></p>
  
  <p><a href="http://www.ikman.lk" rel="nofollow">example two</a></p>
  
  <p>Note: Sorry if this is a very dumb question, I'm just a beginner :)</p>