Hey guys, long time no post. Anyway, i have a quick question. I'm trying to make a small mod where members are forced to add attachments when posting a new thread on a specifed forum.
I was going to do:
PHP Code:
if ($foruminfo['isattach'])
{
$isattach = $DB_site->("
SELECT attachment
FROM " . TABLE_PREFIX . "thread
WHERE threadid = " . $threadinfo['threadid'] . "
");
if ($isattach['attachment'] == 0)
{
// show error
}
else
{
// let user post
}
}
The problem is, the post doesn't make it to the database if there are errors and there is no threadid yet if there are errors. Is there something else i can do, like somewhere that the post is cached or something? Any ideas would be great, thanks.