I think I know what's wrong, you have someone with a username of
Eli'Jah, in thory, that one part of his name
Eli' is causeing the troble (look at the red thing) because (remember, I'm just thinking if it is or not, I'm no PHP god) it's like ending it, I think for you to fix it is by changeing the line from:
PHP Code:
SELECT thread.title AS title FROM thread WHERE lastposter='$forum[lastposter]' AND thread.lastpost=$forum[lastpost]
to
PHP Code:
SELECT thread.title AS title FROM thread WHERE lastposter=addslashes($forum['lastposter']) AND thread.lastpost=$forum[lastpost]
(part code from firefly (next post) that fixed it

)
in thory, it should work but, I don't know what I'm doing, but if this helps, I'll be surpise
good luck