![]() |
|
[PHP] Save Page for user? - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Web Development (https://hackforums.net/forumdisplay.php?fid=183) +---- Thread: [PHP] Save Page for user? (/showthread.php?tid=3293698) |
Save Page for user? - La Manifesto - Feb 28, 2013 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! * - Racialz - Feb 28, 2013 Well you'd need to be logging the likes. So just check your database for a rating where the user & pic are the same. * - La Manifesto - Feb 28, 2013 (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? * - SIM-452112 - Feb 28, 2013 A facebook like button or a like button from your website? :) * - SIM-1419016 - Mar 1, 2013 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" * - La Manifesto - Mar 1, 2013 (Mar 1, 2013 04:00 AM)Timmarus Wrote: When someone clicks the 'like' button, add their username to the list of users who have liked that picture. Are you saying like each time someone likes a photo, create a new row in the table? * - badbrains - Mar 1, 2013 (Mar 1, 2013 05:51 AM)Eisenhower 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) |