I am doing a project on CMS. There is a lot of data on a page including a select
option. I want if any registered user clicks on Select button
from home page (index.php
) then the post will be showing to liked posts page (likedpost.php
).
Similar to an "Add To Cart" function but not as complex. I just want if someone clicks select
button, they can see their post to likedposts
page and there will also be a remove
button to not select.
A MySQLi form would work best.
You must send data to server via AJAX containing unique id of the post when user likes the post and save it in the Database. then in
likedposts
page you must define a realtime ajax request that queries forlikedposts
every second.you can use
websocket
protocol instead of AJAX infinitive requests.