It's likely that you either left whitespace before your opening <?PHP tag, or you tried to send a header using either header() or setcookie() after calling print().
You can either modify your script to ensure that you only call header modifying functions before using print() OR you can use...