I want to send my users to different pages based on user action. So I made multiple functions at the top of the page like so:
Here is how i like to do when i need to send multiple headers :
$headers = array(
'Location' => 'http://www.stackoverflow.com',
'Content-Type' => ' application/pdf',
);
foreach ($headers as $headerType => $headerValue)
{
header($headerType . ': ' . $headerValue);
}
Use headers_sent() to check if you'll be able to send headers or not.