title: Can't get form value with PHP
body: <p>I am trying to get the value of a form (text field) with _POST, and store it to a text file but it doesn't work. Here's my code:</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;form&gt;
  &lt;input type="text" name="test" id="test" value=""&gt;
  &lt;input type="button" onclick="location.href='example.com/index.php?address=true';" value="ODOSLAŤ" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p><strong>PHP</strong></p>
  
  <pre><code>if (isset($_GET['address'])) {
  
      $email = $_POST['test'];
  
      $myfile = fopen("log.txt","a") or die("Error.");
      fwrite($myfile, "\n".$email);
  
      // this prints nothing
      echo $email;  
    }
  </code></pre>
  
  <p>I can't get the value of that text field. Nor GET nor POST doesn't work for me. What am I doing wrong?</p>