943,852 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 1824
  • PHP RSS
Jan 7th, 2009
0

How do I display comments on a webpage?

Expand Post »
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?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
guitarscn is offline Offline
5 posts
since Jan 2009
Jan 8th, 2009
0

Re: How do I display comments on a webpage?

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!
Reputation Points: 10
Solved Threads: 1
Newbie Poster
ashafaaiz is offline Offline
20 posts
since Dec 2008
Jan 8th, 2009
0

Re: How do I display comments on a webpage?

Click to Expand / Collapse  Quote originally posted by ashafaaiz ...
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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
guitarscn is offline Offline
5 posts
since Jan 2009
Jan 8th, 2009
0

Re: How do I display comments on a webpage?

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:


http://i40.tinypic.com/zj9lqh.jpg





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:


http://i44.tinypic.com/2prttaq.jpg





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):


http://i44.tinypic.com/qs77s3.jpg


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).
Reputation Points: 10
Solved Threads: 0
Newbie Poster
guitarscn is offline Offline
5 posts
since Jan 2009
Jan 8th, 2009
0

Re: How do I display comments on a webpage?

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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
guitarscn is offline Offline
5 posts
since Jan 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: class.phpmailer and yahoo.com
Next Thread in PHP Forum Timeline: help sending email at a future date using php





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC