title: Mysql PHP Header Problems
body: <p>Im currently studying databases and php and am having considerable trouble.
  Hope you guys can help.. ok the problem</p>
  
  <p>I have 3 tables created in Mysql, Admin(Using PHPADMIN, on Mac) 
  I have created 3 separate html forms to enter information into these tables.</p>
  
  <p>When I hit submit, I need the information to be redirected and displayed on a separate .php/html page.  The problem im having is that the information is being entered correctly into the tables and it redirects me to the profile page fine the FIRST time. 
  When I go back and make another entry into the same form (with different information) and hit submit it takes me to the profile page, but loading the same information from the first entry.  No matter how many times I try reentering information it keeps loading the first entry.
  All the information I enter is going into the tables correctly.</p>
  
  <p>Heres is the code for the Submit</p>
  
  <pre><code> **&lt;?php
          require 'connect_mysql.php';
  
          error_reporting(E_ALL | E_WARNING | E_NOTICE);
          ini_set('display_errors', TRUE);
  
  
          $SalesmanID = trim($_REQUEST['SalesmanID']);
          $password = trim($_REQUEST['password']);
          $FirstName = trim($_REQUEST['FirstName']);
          $LastName = trim($_REQUEST['LastName']);
          $Phone = trim($_REQUEST['Phone']);
          $Email = trim($_REQUEST['Email']);
          $DateAdded = trim($_REQUEST['DateAdded']);
  
  
  
           // Handle user request
           $insert_sql = "INSERT INTO Salesman (SalesmanID, password, FirstName,   LastName, Phone, Email, DateAdded) " .
                         "VALUES ('{$SalesmanID}','{$password}', '{$FirstName}', '{$LastName}', '{$Phone}', '{$Email}','{$DateAdded}') ; " ;
  
  // Insert the user into the database
           mysql_query($insert_sql)
             or die(mysql_error());
  
  // Redirect the user to the page that displays user information
      header("Location:../staff/salesmen/salesmen_profile_page.php?SalesmanID=" . mysql_insert_id());
      exit();
      ?&gt;**
  </code></pre>
  
  <p>And here is the code on the Redirect Page</p>
  
  <pre><code>  **&lt;?php
  
      require '../../scripts/connect_mysql.php';
  
          error_reporting(E_ALL | E_WARNING | E_NOTICE);
          ini_set('display_errors', TRUE);
  
      // Get the user ID of the user to show
      $SalesmanID = $_REQUEST['SalesmanID'];
  
      // Build the SELECT statement
      $select_query = "SELECT * FROM Salesman WHERE SalesmanID = " . $SalesmanID;
  
      // Run the query
      $result = mysql_query($select_query);
      if ($result) {
        $row = mysql_fetch_array($result);
          $SalesmanID = $row['SalesmanID'];
          $FirstName = $row['FirstName'];
          $LastName = $row['LastName'];
          $Phone = $row['Phone'];
          $Email = $row['Email'];
  
          while($row = mysql_fetch_array($result)){
  
          }
  
  
  
      } else {
        die("Error locating user with ID {$SalesmanID}");
      }
  
      ?&gt;**
  </code></pre>
  
  <p>The error warning shows nothing.</p>
  
  <p>PLEASE HELP!
  Thanks</p>