Page 1 of 1
Comment System
Posted: Sat Sep 21, 2002 9:53 am
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?
Posted: Sat Sep 21, 2002 10:09 am
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){
$com->addComment($HTTP_POST_VARS,$HTTP_POST_VARSї"NEWS_ID"],$HTTP_REFERER);
}
$com->showListing($news_id);
echo "<p>";
if(!$parent_id){$parent_id="0";}
$com->showInputTable($parent_id,$PHP_SELF,$news_id,$username,$email_address);
?>
that's my best guess...
Posted: Sat Sep 21, 2002 10:12 am
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
Posted: Sat Sep 21, 2002 9:14 pm
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.