title: Header location doesn't work
body: <p>Hey i'm learning PHP with some tutorials from lynda.com.
  And in the tutorial we are making a CMS.
  I follow the steps as in the tutorial even got the file from lynda.com and its perfect the same but in the tutorial it works and when i do it the header location doesn't work help.</p>
  
  <pre><code>&lt;?php require_once("includes/connection.php"); ?&gt;
  &lt;?php require_once("includes/functions.php"); ?&gt;
  &lt;?php error_reporting(E_ALL); ini_set('display_errors', 'On'); ?&gt;
  
  &lt;?php
  $menu_name = $_POST['menu_name'];
  $position = $_POST['position'];
  $visible = $_POST['visible'];
  ?&gt;
  &lt;?php
  $query = "INSERT INTO subjects (
              menu_name, position, visible
          ) VALUES (
              '{$menu_name}', {$position}, {$visible}
          )";
  $result = mysql_query($query, $connection);
  if ($result) {
      // Success!
      header("location:content.php");
      exit;
  } else {
      // Display error message.
      echo "&lt;p&gt;Subject creation failed.&lt;/p&gt;";
      echo "&lt;p&gt;" . mysql_error() . "&lt;/p&gt;";
  }
  ?&gt;
  
  &lt;?php mysql_close($connection); ?&gt;
  </code></pre>
  
  <p>the error that i get is as followed</p>
  
  <pre><code>Warning: Cannot modify header information - headers already sent by (output started at      /Applications/MAMP/htdocs/Widgetcorp/create_subject.php:5) in /Applications/MAMP/htdocs/Widgetcorp/create_subject.php on line 19
  </code></pre>