Building Forum system: topic.php from scratch