Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

PHP 

Save Page for user?

I am in the middle of making an image site and I have a like button on the pages. How would I check to see if they have already clicked the like button on the page?

Thanks in advance!
Well you'd need to be logging the likes. So just check your database for a rating where the user & pic are the same.
(Feb 28, 2013 09:02 PM)Racialz Wrote:  Well you'd need to be logging the likes. So just check your database for a rating where the user & pic are the same.

Are you sure that's the only way to do it?
A facebook like button or a like button from your website? :)
When someone clicks the 'like' button, add their username to the list of users who have liked that picture.
If they unlike it, remove their name.
If they view the picture again, and their username is already in a list of users who have liked the picture, make "like" become "unlike"
(Mar 1, 2013 04:00 AM)SIM-1419016 Wrote:  When someone clicks the 'like' button, add their username to the list of users who have liked that picture.
If they unlike it, remove their name.
If they view the picture again, and their username is already in a list of users who have liked the picture, make "like" become "unlike"

Are you saying like each time someone likes a photo, create a new row in the table?
(Mar 1, 2013 05:51 AM)La Manifesto Wrote:  Are you saying like each time someone likes a photo, create a new row in the table?

no, he was talking about a magical storage.

(incase you couldn't tell, yes he means create a new row for each image)


Possibly Related Threads...
Thread / Author Replies Views Last Post
by HackersDec 26, 2022 06:27 PM 0 102 Dec 26, 2022 06:27 PM
Last Post: Hackers
[PHP] by The Real Slim ShaddyApr 2, 2011 03:13 AM 12 134 Apr 2, 2011 03:13 AM
Last Post: The Real Slim Shaddy