I have forms already made that takes the user's name and input box for their comment, but I cannot figure out how to make it so that when the user clicks on Submit button, it will display on the same page in a certain style that I want (justified left with a line break between different comments, including the date it was posted). I think it has something to do with putting the information in a database and reading it, but I have no clue. Any help?

Hi,
Do you have to display all the comments while the user clicking submit button? Then you must store all users and their comments ina database and retrieve it from database, you display the content in a table within the form. You just write CSS coding whatever you want to display and then include the class name in the appropriate <td> of table where you want to display the content. That's it!

Hi,
Do you have to display all the comments while the user clicking submit button? Then you must store all users and their comments ina database and retrieve it from database, you display the content in a table within the form. You just write CSS coding whatever you want to display and then include the class name in the appropriate <td> of table where you want to display the content. That's it!

How do I store it in a database? I don't know any PHP, but someone told me to ask here

Okay, just in case I might have confused some people about what I need, I'll try to make it clearer. I'm going to use an example from Slashdot:


I post website news on my homepage:


[img]http://i40.tinypic.com/zj9lqh.jpg[/img]

When a user clicks on 'Comments,' it leads to another page that looks just like the homepage, except it only displays that one news article that the person clicked on 'Comments' for:


[img]http://i44.tinypic.com/2prttaq.jpg[/img]

The format I want for the Comments section below the article is "Posted by [insert user here] on [insert date here]" followed by a break, the person's message, then a break, then a line to separate the comment from the next comment that will be displayed below that.

The Comment input part between the article and the comments would look like this (just not as ugly):


[img]http://i44.tinypic.com/qs77s3.jpg[/img]


Which is the only thing I already have (the input boxes and Submit button I already have done, but the Submit button doesn't do anything).

I checked this out: http://www.gentlesource.com/comment-script/

But I wasn't sure which snippets of code I needed to copy out to make the information from the form on my website page be put into a MySQL database I just created.

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.