You need to add a button in the page. Use jquery, when button is clicked update the database record and change the button text and css to dislike.
Again when dislike is clicked reupdate the record and change the button text and css.
Refer below link and implement in your code.
If any issue revert back with code.