 <p><code>header</code> statements will not work if there is any output before they are called. In this case, your <code>echo</code>s are killing it. Also, make sure there is no other output before this is called (white space, HTML, etc.).</p>