move everything that looks like:
header("something here");
to the very, very, very top of your file, before any output or HTML begins.
If you see that there are variables being set within the header() functions,
you'll have to move the associate code as well.
....
since that might be a bit involved if you're a complete newbie, you can do this if you are using PHP4.0+
at the very first line of the file write this:
<?
ob_start();
?>
at the very last line write this:
<?
ob_end_flush();
?>
and that will prevent the header problem you are having without having to do anything else (so if you do this, just ignore the previous bit up top)