title: PHP, header(redirect) not working on live server
body: <p>I have this code</p>
  
  <pre><code>if(isset($_GET['elimina_id'])){
      if (in_array($_GET['elimina_id'], $_SESSION['cart']) ) {
          $index = (array_keys($_SESSION['cart'], $_GET['elimina_id']));
          $i = $index[0];
          unset($_SESSION['cart'][$i]);
          header('location: cart.php');
      }
   }
  </code></pre>
  
  <p>Basically, I want to delete a item in the cart. The thing is, on the test page, localhost, everything works, but on live server I have problems with <code>header()</code>. If I put <code>header()</code> the item won't be deleted, the page only reloads without any action taken effect. If I don't put the <code>header()</code>, after I click the 'Delete item' link, nothing happens, but then if I manually reload the page it works, the item deletes.
  On localhost I don't have this problem, what could it be? The php version is OK, could it be some settings in the .ini file ?
  Hope you can help me, Thanks</p>