Comment System

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Kriek
Forum Contributor
Posts: 238
Joined: Wed May 29, 2002 3:46 am
Location: Florida
Contact:

Comment System

Post by Kriek »

Ok, I’m going to play dumb for awhile, because I'm doing something wrong and it's creating errors (different ones) every single time.

Walk me through this (supposed to be) simple script installation.

Comment System

Ok I created the database, threw the SQL queries into PHPadmin and it created the tables and Fields .. now what?
User avatar
hob_goblin
Forum Regular
Posts: 978
Joined: Sun Apr 28, 2002 9:53 pm
Contact:

Post by hob_goblin »

I'm guessing you save that into a file, name it like comment.class.php

then, (using the usage example) try this:

Code: Select all

<?php
include("comment.class.php");
$com = new threaded_comments();
if($comment_submit)&#123;
    $com->addComment($HTTP_POST_VARS,$HTTP_POST_VARS&#1111;"NEWS_ID"],$HTTP_REFERER);
&#125;
$com->showListing($news_id);
echo "<p>";
if(!$parent_id)&#123;$parent_id="0";&#125;
$com->showInputTable($parent_id,$PHP_SELF,$news_id,$username,$email_address);
?>
that's my best guess...
User avatar
hob_goblin
Forum Regular
Posts: 978
Joined: Sun Apr 28, 2002 9:53 pm
Contact:

Post by hob_goblin »

wow, there is actually alot more to it...

Code: Select all

$com = new threaded_comments();
$com->db_user = "username";
$com->db_pass = "password";
$com->db_host = "localhost";
$com->db_name = "comments";
will pretty much construct it...

you just need to look at the functions inside it, and see what they do..
disregard sqlsend, and sqlfetch, they are for use in the other functions
User avatar
Kriek
Forum Contributor
Posts: 238
Joined: Wed May 29, 2002 3:46 am
Location: Florida
Contact:

Post by Kriek »

Thank chief .. I was doing it all right, but there are somethings in the rest of my coding for the pages that was messing this up. Again thanks.
Post Reply