Fix Headers Sent Error with explanation for the reasons that cause this errors You will learn about ================ ob_start ob_end_flush UTF Byte Order Marks ================ ob_start link on php manual http://php.net/manual/en/function.ob-start.php Useful Article http://stackoverflow.com/questions/8028957/how-to-fix-headers-already-sent-error-in-php/8029979#8029979