My code is working great in terms of submitting data to my MySQL database.  After submission, I'd like to go to another page. I have read through the many posts on this subject and the consistent answer is to use header('Location: /directory/mypage.php');.  
I have tried to insert this header into many different locations on my page and I cannot get it to work. I'm sure I am missing something small but I cannot locate the issue. My code is below. Thanks in advance.
<html>   
<body>
  <?php
  session_start();
  $sessionid = session_id();
     if(isset($_POST['add']))
     {
        $dbhost = 'localhost:3036';
        $dbuser = 'user';
        $dbpass = 'pass';
        $conn = mysql_connect($dbhost, $dbuser, $dbpass);
        if(! $conn )
        {
           die('Could not connect: ' . mysql_error());
        }
        if(! get_magic_quotes_gpc() )
        {
           $Gravity = addslashes ($_POST['Gravity']);
           $Time = addslashes ($_POST['BoilTime']);
        }
        else
        {
           $Gravity= $_POST['Gravity'];
           $Time = $_POST['BoilTime'];
        }
        $IBU = $_POST['IBU'];
                $sql = "INSERT INTO tblVariableTimeUtilzation ( Sessionid, Gravity, IBU, ml, Time, Utilization ) SELECT '$sessionid',tblIBUat60minBoil.Gravity, tblIBUat60minBoil.IBU, tblIBUat60minBoil.ml, tblUtilization.Time, tblUtilization.Utilization FROM tblIBUat60minBoil INNER JOIN tblUtilization ON tblIBUat60minBoil.Gravity = tblUtilization.Gravity GROUP BY tblIBUat60minBoil.Gravity, tblIBUat60minBoil.IBU, tblIBUat60minBoil.ml, tblUtilization.Time, tblUtilization.Utilization HAVING (((tblIBUat60minBoil.Gravity)=". $Gravity .") AND ((tblIBUat60minBoil.IBU)=". $IBU . ") AND ((tblUtilization.Time)='60'));";
                $sql2 = "INSERT INTO tblPull60MinUtilization ( Sessionid, Gravity, IBU, ml, Time, Utilization ) SELECT '$sessionid', tblIBUat60minBoil.Gravity, tblIBUat60minBoil.IBU, tblIBUat60minBoil.ml, tblUtilization.Time, tblUtilization.Utilization FROM tblIBUat60minBoil INNER JOIN tblUtilization ON tblIBUat60minBoil.Gravity = tblUtilization.Gravity GROUP BY tblIBUat60minBoil.Gravity, tblIBUat60minBoil.IBU, tblIBUat60minBoil.ml, tblUtilization.Time, tblUtilization.Utilization HAVING (((tblIBUat60minBoil.Gravity)=". $Gravity .") AND ((tblIBUat60minBoil.IBU)=". $IBU . ") AND ((tblUtilization.Time)='60'));";
       $sql3 = "SELECT Sessionid FROM tblPull60MinUtilization WHERE Sessionid='59a185f576f0d27ab5ae5825fe1463f3'";
 $result = mysql_query($sql3); 
 $myrow = mysql_fetch_array($result);
        mysql_select_db('ExtractCalculation');
        $retval = mysql_query( $sql, $conn );
        if(! $retval )
        {
           die('Could not enter data: ' . mysql_error());
        }
        $retval2 = mysql_query( $sql2, $conn );
        if(! $retval2 )
        {
          die('Could not enter data: ' . mysql_error());
        }
     echo "Entered data successfully";
        header('Location: http://www.cnn.com);
        mysql_close($conn);
     }
     else
     {
        ?>
           <form method="post" action="<?php $_PHP_SELF ?>">
              <table width="400" border="0" cellspacing="1" cellpadding="2">
                 <tr>
                    <td width="100">Gravity</td>
                    <td><input name="Gravity" type="text" id="Gravity"></td>
                 </tr>
                 <tr>
                    <td width="100">IBU</td>
                    <td><input name="IBU" type="text" id="IBU"></td>
                 </tr>
                 <tr>
                    <td width="100">Boil Time</td>
                    <td><input name="BoilTime" type="text" id="BoilTime"></td>
                 </tr>
                 <tr>
                    <td width="100"> </td>
                    <td> </td>
                 </tr>
                 <tr>
                    <td width="100"> </td>
                    <td>
                       <input name="add" type="submit" id="add" value="Calculate mls Needed">
                    </td>
                 </tr>
              </table>
           </form>
        <?php
     }
  ?>
</body>
</html>
 
    