Look for what the code is trying to do at line 15 of main.php. Without seeing the entire code it's difficult to say. You could try posting this thread in the php section.
The error means that you are already writing output to the user's web browser before you called session_start().
Yeah, the "session_start()" needs to be at the very top of the page. Try posting in the PHP forum instead of the HTML/design one, you'll get a better response Scott