I’m creating a jokes website. Each joke is stored as a record in mysql db. I’m trying to develop a vote link which increments the joke record’s “score” column when a “vote” link is clicked.
I’m just hoping for some general direction as to how to do this… I’m planning on using jquery’s ajax to send the joke’s id to a php page to process. I’m just not sure how exactly to process it… something like this?
$id = $_POST['id']
mysql_query("UPDATE jokes SET score='++' WHERE id='$id'");
Each joke will be within a uniquely identified <div> (the id= is generated with the record’s unique id).
Thanks a lot!
As per “The Scrum Meister”‘s suggestion