If you do want to use the header function after html has been output, you can always look at using output buffering (ob_start()).
If you do want to use the header function after html has been output, you can always look at using output buffering (ob_start()).