I tried your script and I got an error.
I tried using this:
PHP Code:
session_start();
$formErr = "";
$username = $when = $where = $offence = "";
if (isset($_GET['submit'])) {
if (empty($_GET["username"]) || empty($_GET["when"]) || empty($_GET["where"]) || empty($_GET["offence"])) {
$formErr = "<br>You have not completed the entire form - everything must be completed! (*)";
} else {
$username = $_GET["username"];
$when = $_GET["when"];
$where = $_GET["where"];
//after variables retrieved for inputs:
sendReport();
}
}
function sendReport() {
require_once('./includes/functions_databuild.php');
$threaddm =& datamanager_init('Thread_FirstPost', $vbulletin, ERRTYPE_ARRAY, 'threadpost');
$forumid = 33;//$vbulletin->GPC['fid']; // can also be a number ;) $forumdid= 12;
$foruminfo = fetch_foruminfo($forumid);
$threaddm->set_info('forum', $foruminfo);
$threaddm->set('forumid', $foruminfo['forumid']);
$threaddm->set('userid', 19);
$threaddm->set('title', 'PHP MAKE THREAD TEST');
$threaddm->set('pagetext', 'PHP MAKE THREAD TEST');
$threaddm->set('allowsmilie', 1);
$threaddm->set('visible', 1);
$threaddm->set('dateline', TIMENOW);
$threaddm->save();
}
And still an error.