0
I have a button that adds the value +1 in the database and shows the total of "Likes" that the article already has.
<a class='btn' href=portal/fav.php?id=".$produto['id']."> <span class='badge bg-red'>".$produto['fav'] . "</span> <i class='fa fa-heart-o'></i> Likes </a>
Only this way the page will update. How do, for when click the button, it update, without updating the page?
The php page that does the update is
fav.php
You will have to use a jQuery that does this... That accesses this fav.php, update and return with the updated number. Using json is very easy to do... I’ll see if I can find an example for you!
– Sr. André Baill
No answer solved the problem?
– Marcelo de Andrade