title: PHP $_POST not being passed through from textarea
body: <p>I have the following script to ask for a password and then ask the user if they want to edit a page. Click on a page opens it up in the '<code>&lt;textarea&gt;</code>', the save button should then send the content of the text area to the script again for writing. (I am aware that this isn't the safest way of authenticating, if there is any way of doing this without SQL I'd like to hear it.)</p>
  
  <p>The problem is that the content of the text area isn't being passed through to the updateFile() function.</p>
  
  <pre><code>&lt;?
  session_start();
  $pass = 'generic_password';
  $login ='&lt;form action="?page=admin" method="post"&gt;
          Password: &lt;input type="password" name="pass" /&gt;
          &lt;input type="submit" /&gt;
          &lt;/form&gt;'; 
  function updateFile($file){
      $area=$_POST['area'];
      $fd=fopen($file,"w");
      fwrite($fd,$area);
      fclose($fd);
      echo $file.' has been saved';
      }
  if (!isset($_POST['pass']) &amp;&amp; $_SESSION['authed'] == false){
      echo $login;  
      $_SESSION['authed'] = false;
      }
  elseif ($_POST['pass'] == $pass || $_SESSION['authed'] == true){
      $_SESSION['authed'] = true;
  
      if(isset($_POST['submit'])){
          updateFile($_POST['file']);
      }
  
      echo "Select a page to edit&lt;br/&gt;";
      echo "&lt;ul&gt;";
      foreach (glob("{*.html,*.css}",GLOB_BRACE) as $x){
          echo "&lt;li&gt; &lt;a href=\"?page=admin&amp;edit=$x\"&gt;$x &lt;/a&gt;&lt;/li&gt;";
      }
      echo "&lt;/ul&gt;";
      if (isset($_GET['edit'])){
          echo '&lt;script type="text/javascript" src="nicEdit.js"&gt;&lt;/script&gt; 
                &lt;script type="text/javascript"&gt; 
                  bkLib.onDomLoaded(function() { nicEditors.allTextAreas() });
                &lt;/script&gt; ';
          echo '&lt;form method="post" action="?page=admin"&gt;You are editing: &lt;a name="file"&gt;'.$_GET['edit'].'&lt;/a&gt; &lt;textarea name="area" style="width:920px;"&gt;';
          include $_GET['edit'];
          echo '&lt;/textarea&gt;
                &lt;input name="submit" value="Save" type="submit" /&gt;
                &lt;/form&gt;';
      }
  }
  else
      echo "something went wrong";
  
  ?&gt;
  </code></pre>