title: Variable transference fail
body: <p>Well, I have  a hidden form on one page just to send a value to another php file.
  The first file is:</p>
  
  <pre><code>&lt;?php
  
      $ncarts = $_POST["ncarts"];
      $npedras = $_POST["npedras"];
  
  echo "&lt;html&gt;&lt;head&gt;&lt;title&gt;Insirss&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;form method=\"post\" action=\"puxar.php\"&gt;";
  
  $abrindo = fopen ("cartelas.txt", "a+");
  
  for ($c=1; $c&lt;=$ncarts; $c++){
           for ($n=1; $n&lt;=$npedras; $n++){
             $x = "termo{$n}da{$c}";
             $dados = $_POST[$x]."\r\n";
             fwrite ($abrindo, $dados);
           }
  }
  fclose ($abrindo);
  $zeta = $c-1;
  
  if ($zeta==1) {
  echo "Voce teve uma registrada com sucesso &lt;br&gt;&lt;hr&gt;";
  } elseif ($zeta &gt; 1) {
  echo "Voce teve " . $zeta . " registradas!&lt;br&gt;&lt;hr&gt;";
  } else {
  echo "Voce nao registrou nada! &lt;br&gt;&lt;hr&gt;
  &lt;a href=\"http:/site\"&gt; Ir para o inicio &lt;/a&gt; &lt;br&gt; ";
  }
  
  echo "&lt;a href=\"http://site/asasas\"&gt; Checar resultado&lt;br&gt;&lt;/a&gt;&lt;a href=\"http://site/puxar.php\"&gt; Veja aqui &lt;/a&gt; ";
  
  echo "&lt;input type=\"hidden\" name=\"ncarts\" value=\"$ncarts\"&gt; 
  &lt;input type=\"hidden\" name=\"npedras\" value=\"$npedras\"&gt; &lt;/form&gt; &lt;/body&gt;&lt;/html&gt;";
  
   ?&gt;
  </code></pre>
  
  <p>The variables that i've mentioned are <em>$npedras</em> and <em>$carts</em>. </p>
  
  <p>And the mentioned puxar.php on the form action is:</p>
  
  <pre><code>&lt;?php
  $ncarts = $_POST["ncarts"];
  $npedras = $_POST["npedras"];
  $todos_numeros = file ("cartelas.txt"); 
  foreach ($todos_numeros as $r){
  echo $r . "&lt;br&gt;";
  }
  echo $ncarts;
  ?&gt;
  </code></pre>
  
  <p>What happens is that the $ncarts doesn't arrive on the last file. I'm exhausted of looking for typing errors... Someone help me??
  Thanks!</p>