Creating a 'Like' button

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
geko21
Forum Newbie
Posts: 1
Joined: Sun Mar 06, 2011 12:11 pm

Creating a 'Like' button

Post by geko21 »

Hi guys, bassically I want to create a Like button for my website so people visiting dont have to comment the content they can just click a button to say they like it and also display the amount of people who have clicked the button aswell (bit like what facebook has done with the buttons). Im not sure how to start this so if anyone can help me it would be great.

heres an idea of what im trying to do

Image
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: Creating a 'Like' button

Post by social_experiment »

A database can work in this instance. When a visitor clicks the link you can increase an amount already in the database and then display that value back (X people likes this). You should also check that a user can only 'like' once per day to make your results more 'accurate'.
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
Post Reply