Jump to content

processing separate form inside while loop with unique submit form


Bhudda

Recommended Posts

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.