You might wish to do a search on:

Warning: Cannot modify header information - headers already sent by

As this is a real common error in php that you will want to become more familar with ......