Hello I am working on a voting script.
So far I have this placed in a PHP while loop.
When a user clicks the button it processes the vote.php page and adds a vote to the database. How can I use jQuery to simply increment the $row['vote_count'] result by +1 without refreshing the page.Code:jQuery("#up a").click(function () { $.ajax({ type: "POST", url: "vote.php?up=<? echo $row['post_id']; ?>", }); }); $row['vote_count'] // Displays the number of votes



Reply With Quote


Bookmarks