Why is PHP header() function not working?
<p>PHP noobie here. Wondering why page doesn't redirect to specified location when user clicks email submit button. $mailSent equals true and when I get rid of the exit command it stays on the same page, so it's responding to the if statement, just not directing to the right page.  </p>

<pre><code>&lt;?php 
$errors = array();
$missing = array();
//check if the form has been submitted
if (isset($_POST['send'])) 
{
//email processing script
$to = $_POST['email'];
$subject = 'Your Quote';
$expected = array('email',);
$required = array('email');
$headers .= 'Content-Type: text/plain; charset=utf-8';
  require('./includes/processmail.inc.php');
  if ($mailSent) {
    header('Location: http://www.dailyspiro.com/email.php');
    exit;
}
}       
?&gt;
</code></pre>
