title: Right way to redirect after form submit
body: <p>Maybe its a stupid question, but what is right way to redirect user to the success page after form is saved in database? </p>
  
  <p>I dont know why, but if I add <code>action="done.php"</code>, than the form does not save data to my database. </p>
  
  <p>I tried to add <code>header ("location:/done.php");</code> it worked, but when I moved page to original server ( PHP 4 and MySQL 3.23.5 ) there is error when I am trying to send the form <code>Warning: Cannot modify header information - headers already sent by ........</code></p>
  
  <p>Here is my php code : </p>
  
  <pre><code>if(isset($_POST['submit']))
  {
  $name=$_POST['name'];
  $email = $_POST['email'];
  $company = $_POST['company'];
  $adress = $_POST['adress'];
  $post = $_POST['post'];
  $phone = $_POST['phone'];
  
  $sql="INSERT INTO tekstile_users (id, name, email, company, adress, post, phone)
  VALUES
  ('', '$name','$email','$company', '$adress', '$post', '$phone')";
  
  if (mysql_query($sql,$con)) {
  
      header ("location:/done.php"); 
      }
      else {
  echo "Something is wrong";
  }
  
  }//end of submit button
  </code></pre>
  
  <p>I <strong>fix</strong> it converting that .php file to <code>UTF-8 without BOM</code> . </p>
  
  <p>Thanks all for suggestions!</p>