Bhudda Posted August 2, 2013 Share Posted August 2, 2013 So a friend and I have recently started coding a simple posting webpage. At the moment we are trying to make a like button to like other posts but we are having trouble. We have made this like button and it works kind of right, the only problem is that when we click it, it adds a like to all the posts not just the one we click. Since we are trying to make a very simple page for now, we would like to keep the amount of files to a minimum and so we can not, nor would we like to, use the facebook like button. We are using Wamp, I don't think that would be relevant just like to add it in there. connection.php wall.php Quote Link to comment Share on other sites More sharing options...
Muddy_Funster Posted August 2, 2013 Share Posted August 2, 2013 I'm not seeing any code that would fire on the Like buttons submit action. Also, to make this work, you need to have the unique identifier of the post that you are applying the like to in orfer to use it to set which post is being liked. The system you are using has some serious flwas - not least of which is no persistance regarding whether the user has liked that post already or not - you could end up with 20 users and a post that has a few million likes.... Having looked at your code, I'm a bit nervous about your db design - could you post up your table structure as well? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.