I was wondering if anyone had any good places I could look at to learn how to write a comments script. I need to allow comments on content if people are signed in. Thanks

I would understand how to do the actual php coding, I'm just wondering if anyone can kind of explain the database table setup to me.

If ya want a tutorial all it takes is a google or yahoo search. A good one I found was at http://www.zimmertech.com/tutorials/php/25/comment-form-script-tutorial.php which shows how to make a comments box in a similar way that I would do it although there is a lot of optional code in the tutorial. Hope that helps and just let me know if you need a hand understanding the code.

Alright I kind of came up with my own solution. Basically store the user that's commenting's username and then store the content's id number. then just recall all the comments based on the id number. I appreciate the reply. Now I have to think up a way of doing replies.

Well for comments script u can visit php tutorials at EMAMMABLOG

where u will get to know variety of ways through which u can comment in PHP

you can create two tables and then join them when u query for the data. one is the user table and the other is the comments table

im just posting the comments table. the other table u make urself.

--------------------------
comment_id
int(11)
NOT NULL
auto increment
----------------------
comment_content
text
NOT NULL
-----------------------
user
int(11)
NOT NULL
-------------------------
date_posted
varchar(50)
NOT NULL
------------------------

use user field to link with the user table.

yeah i got that up and running. any suggestions on how to do replies and have them show up in a thread fashion the way disqus does it? i.e. a reply to a comment would be indented from the rest of the comments.

anyone?

And so with your current script you can post comments but not view them? What exactly needs to be done? Have you already done any code in relation to this and if so please post it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.