RSS Forums RSS

How do I display comments on a webpage?

Reply
Posts: 5
Reputation: guitarscn is an unknown quantity at this point 
Solved Threads: 0
guitarscn guitarscn is offline Offline
Newbie Poster

How do I display comments on a webpage?

  #1  
Jan 7th, 2009
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?
AddThis Social Bookmark Button
Reply With Quote  
Posts: 19
Reputation: ashafaaiz is an unknown quantity at this point 
Solved Threads: 1
ashafaaiz ashafaaiz is offline Offline
Newbie Poster

Re: How do I display comments on a webpage?

  #2  
Jan 8th, 2009
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!
Reply With Quote  
Posts: 5
Reputation: guitarscn is an unknown quantity at this point 
Solved Threads: 0
guitarscn guitarscn is offline Offline
Newbie Poster

Re: How do I display comments on a webpage?

  #3  
Jan 8th, 2009
Originally Posted by ashafaaiz View Post
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
Reply With Quote  
Posts: 5
Reputation: guitarscn is an unknown quantity at this point 
Solved Threads: 0
guitarscn guitarscn is offline Offline
Newbie Poster

Re: How do I display comments on a webpage?

  #4  
Jan 8th, 2009
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).
Reply With Quote  
Posts: 5
Reputation: guitarscn is an unknown quantity at this point 
Solved Threads: 0
guitarscn guitarscn is offline Offline
Newbie Poster

Re: How do I display comments on a webpage?

  #5  
Jan 8th, 2009
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.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.



Views: 530 | Replies: 4 | Currently Viewing: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 3:09 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC