Posted a small change which would fix a stupid bug on my part, it just changes the one line.
PHP Code:
Change
$lastthreads=$DB_site->query("SELECT dateline FROM thread WHERE dateline > UNIX_TIMESTAMP(NOW())-3600 AND postusername='$bbuserinfo[username]'");
to
$lastthreads=$DB_site->query("SELECT dateline FROM thread WHERE dateline > UNIX_TIMESTAMP(NOW())-3600 AND postusername='".addslashes($bbuserinfo[username])."'");