Comments

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
baudday
Forum Newbie
Posts: 3
Joined: Wed Apr 22, 2009 10:51 pm

Comments

Post by baudday »

I hope this is the right place for posting this. If it's not, sorry.

I was wondering if anyone could show me a good resource that could help in the design of a comments system. Basically I want something where a user can comment on another user's content. I'm just not sure how to go about setting up the db's and stuff. Also, I want a reply to another's comment to appear indented like it would be in a thread. Thank you.
coalgames
Forum Newbie
Posts: 8
Joined: Sun Apr 26, 2009 12:22 am

Re: Comments

Post by coalgames »

Yeah, this is unfortunately the incorrect area. But I can still give you some hints.

All you have to do is make a database. Then the script asks for input and also displays comments at the same time. Just escape the string and insert.

To make quote thingies like :
This
either use a div with margins around it and a border or use blockquote.
baudday
Forum Newbie
Posts: 3
Joined: Wed Apr 22, 2009 10:51 pm

Re: Comments

Post by baudday »

I appreciate the reply. I was at a loss for how to recall the correct comments to the correct pages. Which sounds dumb, but I thought I would do it using id's. So each time someone posts a comment, the storyid is saved to it, then I just recall all the comments with the same id.
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: Comments

Post by josh »

Right, each comment record would have a foreign key for the id of the content the user is commenting on. You would SELECT from the comments table Where story_id = x, probably order by a datetime field
Post Reply