Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Damon Pace
657 PointsActivity feed actions & comments
I have built an activity feed on my website with PHP and am now running into a problem with allowing users to comment or like each item using a form and ajax post. I can get the first item to post properly, but anything underneath that breaks.
It seems to be an issue with having multiple forms on one page. The system takes the first product_id for each form and won't allow the submission to process properly.
Anyone have any thoughts on solving this issue? I'm fairly new to PHP, but can work my way around a foreach statement fairly well.
Thanks for your help in advance.
1 Answer
Jake Craige
4,913 PointsIt would help for you to post your code so we can take a look at the specific situation. Either post it using Markdown tags or post it on a place like pastebin. I think I understand what you are asking though and i've had a similar issue with a project i've been working on recently.
The word you used "activity feed" makes me think of something like a facebook feed. With that, I would just give each post that they can comment on a unique id and have it post that id so it knows where to add the comment to