I am trying to have this function limit a user to only one vote per image. However it currently lets all votes through. If I change "if existing_vote != 0:" to "if existing_vote == 0:" it lets no votes through. Thoughts?
class VoteHandler(webapp.RequestHandler):
def get(self):
#See if logged in
self.Session = Session()
if ...
PHP mysql vote once script? How it works?
user can vote once....
what to use cookie, session?
...
I'm building a music voting application, similar to stack overflow almost.
I have 3 tables, Charts, ChartItems, Votes.
I'm trying to bring back a list of chartitems, which link to a single chart, with the number of votes for each chart item counted.
This is what I am trying currently
var firstList = from chartItem in db.ChartItems
...
i have got this script that works fine, that allows a user to vote, but im kind of stuff of how i can make the vote button, when clicked again it toggle back to normal image! just like stackoverflow:
this is my script:
$(document).ready(function() {
$('.statuses').delegate('.vote_up', 'click', function(e) {
//stop event
...
I am working on a Facebook app that will allows users to vote on their favorite pictures, based on their friend's profiles pictures. I know how to display the images, just not how to get the list of the current user's friend's IDs. My application is written in PHP. This is the last thing I need to complete the app. Any help would be grea...