| | |
How do I display comments on a webpage?
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jan 2009
Posts: 5
Reputation:
Solved Threads: 0
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?
•
•
Join Date: Dec 2008
Posts: 19
Reputation:
Solved Threads: 1
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!
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!
•
•
Join Date: Jan 2009
Posts: 5
Reputation:
Solved Threads: 0
•
•
•
•
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!
•
•
Join Date: Jan 2009
Posts: 5
Reputation:
Solved Threads: 0
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).
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).
•
•
Join Date: Jan 2009
Posts: 5
Reputation:
Solved Threads: 0
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.
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.
![]() |
Similar Threads
- Form to Email Troubleshooting (PHP)
- The most famous CSS web sites galleries in the world (HTML and CSS)
- php help (PHP)
- Firefox Compatibility help with script (JavaScript / DHTML / AJAX)
- Newbie: Creating Blog-style Messageboard (Dreamweaver 8) (ASP)
Other Threads in the PHP Forum
- Previous Thread: class.phpmailer and yahoo.com
- Next Thread: help sending email at a future date using php
| Thread Tools | Search this Thread |
apache api array beginner binary body broken buttons cakephp checkbox class cms code cron curl database date date/time display dynamic ebooks echo email error file files folder form forms function functions global google href htaccess html image include insert ip javascript joomla limit link list login mail mediawiki menu mlm msqli_multi_query multiple mycodeisbad mysql number oop parameter paypal pdf php phpincludeissue problem query radio random recourse recursion regex remote script search seo server sessions sms source sp space speed sql static subdomain syntax system table tag tutorial update upload url validator variable vbulletin video web webdesign white wordpress xml youtube





