first of all, I've had no luck with the $DB_SITE command, it's given me nothing but problems for the query I want to do.
I have replaced :
PHP Code:
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($title))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconid','$visible')");
in newreply.php with the following :
PHP Code:
// inserting the post here.
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($title))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconid','$visible')");
// jordan's credits hack!
$myuserid = $bbuserinfo['userid'];
$myconnection = mysql_connect("localhost", "sample_samplecij", "orBux2");
if (!$myconnection) {
echo "<p> An error occured while trying to access the database, please notify the webmaster for a quick solution.</p><br>";
echo mysql_errno().": ".mysql_error()."<br>";
exit();
}
$creditquery = "UPDATE sc_reviewaccounts SET posts=posts+1 WHERE userid='$myuserid'";
mysql_db_query($dbname, $creditquery);
so as to reward a user one credit each time they reply to a post.
but... check this weirdness out! this is the SQL error i get :
and i get the following error :
anyone have a clue what i can do to make this work?
..jordan willms