Change to:
PHP Code:
echo("
INSERT INTO " . TABLE_PREFIX . "thread_bank(title, lastpost, forumid, open, replycount, postusername, postuserid, lastposter, dateline, visible, sticky)
VALUES ('" . addslashes($newpost[title]) . "', NULL, " . intval($newpost[toforumid]) . ", 1, 0, '" . addslashes($newpost[username]) . "', " . intval($newpost[userid]) . ", '" . addslashes($newpost[username]) . "', NULL, 1, 0)
");