tags:

views:

55

answers:

2

hello everyone,

please tell me how can i write a Rating code in PHP. Like Thumb Up and Thumb Down.

Please help me

thanks in advance

+5  A: 

You need to do an AJAX call to the server, specifying whether current action is upvote or downvote, the server will take the parameter, act accordingly, and return current total votes.

For an example, install firebug, open the console and click the up and down votes on the left of this answer, watch the console to see the requests that are taking place.

aularon
good answer in a good opportunity... Many may upvote you to check that, many may downvote too. your reputation is under gamble!! I upvoted by the way.
sandeepan
The point is once they see the magic they will upvote, and then I will rule the earth :P
aularon
thanks for this but can u pls give me the code in u r language....simple language..plsssssssssss thanks once again
Ricky Dang
Ahahahahahahaha! This really is a gamble. We will see how it plays out.
Pekka
@Gitesh this is not a "write my code for me" site. Start developing your own approach and if you hit any snags, people will be happy to help out.
Pekka
@Gitesh try with it, and if there's something you are stuck it, come here and post a question about that, and people will help you find your mistake.
aularon
-1 as an experimentation... (Of course, I kid.)
BoltClock
+2  A: 

I haven't actually read it, but there is a tutorial for exactly the kind of thing you want to do: http://ad1987.blogspot.com/2009/02/reddit-style-voting-with-php-mysql-and.html

sprain
+1 Looks all right.
Pekka