possible things comes to mind:
1. has the tcl changed from the one you put here ?? as the ".:|No Such Team On xXxXx7|:." is not shown on your tcl code. so if so put it here too, possibly u made wrong <IF sentence> there.
2. is LF var declared on your php file ?? (as i don't see it either)
it should be set to "\n".
if not then rewrite your bottom section to be like:
You must first be a
registered member to view any code.
3. assuming the query returns error (and finds no records),
on the code it's:
You must first be a
registered member to view any code.
so left to ask is your table name "userteam" - without any PREFIX ???