A: It's session_register('username');
B: It's safer (and faster) to use $_SESSION['username'] instead of session_register('username') and $username
C: You must not send any content at all out to the browser before session_start() is called. No HTML, no blank lines before the first <?php, nothing. You can probably send headers, but no content.