2007-07-30, 07:35 PM
I would like to receive some help from you for adding my database's data to the forum.
Actually Iam trying to add a reply to the post. The following code Iam using to add the post. But it results nothing. Can you say what is missing on the following code to make a new reply to a thread?
What is missing on the code to make it as a successful reply?
Actually Iam trying to add a reply to the post. The following code Iam using to add the post. But it results nothing. Can you say what is missing on the following code to make a new reply to a thread?
$query = "SQL QUERY";
$result = mysql_query($query);
$posthandler = new PostDataHandler("insert");
$posthandler->action = "do_newreply";
$post = array(
"tid" => $tid,
"fid" => $fid,
"subject" => $subject,
"icon" => -1,
"uid" => 1,
"username" => 'admin',
"message" => $message,
"ipaddress" => '',
"posthash" => '',
"savedraft" => 0,
);
// Set up the post options from the input.
$post['options'] = array(
"signature" => 'yes',
"emailnotify" => 'no',
"disablesmilies" => 'yes'
);
$posthandler->set_data($post);
$valid_post = $posthandler->validate_post();
// Fetch friendly error messages if this is an invalid post
if(!$valid_post)
{
die("Error on Inserting Post");
}
What is missing on the code to make it as a successful reply?