As far as I know, this error message appears (as said above) only when output was sent, before the session_start();
open your page with
<?php
session_start();
?>
you can now do anything you want, or code everything you want. Create session variables with session_register(). For example session_register("ThisIsASessionVar");
now you can change the value of the session averywhere in your code.
$ThisIsASessionVar = "My First Session Worked!";