LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 04-14-2009, 12:25 AM   #1
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,546

Rep: Reputation: 51
PHP code for "Post comments" for your website?


PHP code for "Post comments" for your website?

Is there some source code somehow?

Thanks
Best regards
 
Old 04-16-2009, 04:29 PM   #2
jstephens84
Senior Member
 
Registered: Sep 2004
Distribution: (Home)Opensolaris, Ubuntu, CentOS, (Work - AIX, HP-UX, Red Hat)
Posts: 2,054

Rep: Reputation: 83
Could you elaborate a little on what you are looking for? I am not totally sure I am understanding your question. I think you are asking for code that will show all the comments posted for a blog
 
Old 04-17-2009, 03:14 AM   #3
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,546

Original Poster
Rep: Reputation: 51
Quote:
Originally Posted by jstephens84 View Post
Could you elaborate a little on what you are looking for? I am not totally sure I am understanding your question. I think you are asking for code that will show all the comments posted for a blog
actually something like this:
http://lh3.ggpht.com/darraghdoyle/SC...ss_comment.JPG

or blog-like, beautiful or not, the simpler the bester usually
 
Old 04-17-2009, 08:39 AM   #4
jstephens84
Senior Member
 
Registered: Sep 2004
Distribution: (Home)Opensolaris, Ubuntu, CentOS, (Work - AIX, HP-UX, Red Hat)
Posts: 2,054

Rep: Reputation: 83
Quote:
Originally Posted by frenchn00b View Post
actually something like this:
http://lh3.ggpht.com/darraghdoyle/SC...ss_comment.JPG

or blog-like, beautiful or not, the simpler the bester usually
Ok - so you should have a few tables. Users, BlogArticle, and Comments. Then when someone clicks on the link on the blog it would go to say comment.php?blgart=1 what that would say is go to the comments form page and add a comment for blog article 1. Then after they submit it would go to the comments table. The what you would do is in php create a script that might have the following (depending on how the table is setup)
Code:
$query = sprinf('Select * from comments where blogid = ', mysql_real_escape_string($blogid))
$results = mysql_query($query, $db)
while($row = mysql_fectch_array($results, MYSQL_ASSOC)
{
  echo "<div id='comment'>";
  echo "<h3>$row['name']<h3>"; // This represents the comment name
  echo "<p>$row['comment']</p>; // this will output the comment left
  echo "</div>;
}
this is a rough outline and should be expanded on but I hope that is what you had in mind.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"HOWTO Change Colour of Comments in VIM editor" manikantha Linux - General 8 07-16-2013 03:36 AM
Post back , How to get "yum" and "ndiswrapper" to work? BootLaptop Linux - Wireless Networking 1 07-17-2007 08:27 PM
Incorrect PHP code is working, shoud I "fix" it? rblampain Programming 6 04-28-2006 10:33 PM
Take all posts from "Website Suggestions & Feedback" out of the "0 Reply Thread&q t3gah LQ Suggestions & Feedback 7 03-21-2005 07:27 PM
Comments request for "O'Reilly's Linux iptables Pocket Reference" carboncopy General 3 03-03-2005 09:24 PM


All times are GMT -5. The time now is 12:54 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration