" .htmlspecialchars($r['content']). "
" .intval($_GET['newpost']). " ORDER BY postid, posted") or die(mysql_error()); $last_post_query = mysql_query("SELECT postid, belongs FROM forum_posts WHERE belongs = " .intval($_GET['threadID']). " ORDER BY postid DESC LIMIT 1") or exit(mysql_error()); $last_posts = mysql_fetch_assoc($last_post_query); $thread_info = mysql_query("SELECT p.posted AS created, p.title, p.belongs AS threadid, h.category AS father, r.rubrik AS grandpa FROM forum_posts AS p JOIN forum_threads AS t ON t.id = p.belongs JOIN forum_heads AS h ON t.belongs = h.catid JOIN forum_rubriker AS r ON r.titlesid = h.belongs WHERE p.belongs = ". intval($_GET['threadID']) ." AND p.first = 1") or exit(mysql_error()); function protect($what){ $what = htmlspecialchars(htmlspecialchars($what)); return $what; } if(mysql_num_rows($q) > 0 || mysql_num_rows($thread_info) > 0){ while($r = mysql_fetch_assoc($q)){ $extra_lank = ''; echo "