title: $_post not working on upload form
body: <p>I have this upload form:</p>
  
  <pre><code>        &lt;form action="upload.php" enctype="multipart/form-data" method="post"&gt;
              &lt;b&gt;Select your image:&lt;/b&gt;&lt;br&gt;&lt;input type="file" name="userfile" id="file" size="90%" /&gt;&lt;br&gt;
              (Max size: 10mb)&lt;br&gt;
              &lt;b&gt;Browseable:&lt;/b&gt;&lt;br&gt;&lt;input type="radio" name="browse" id="browse" value="1" /&gt; Yes &lt;input type="radio" name="browse" id="browse" value="0" /&gt; No&lt;br&gt;
              &lt;input type="submit" value="Upload Image" size="100" /&gt;
          &lt;/form&gt;
  </code></pre>
  
  <p>And this PHP code:</p>
  
  <pre><code>    &lt;?PHP
      $maxsize = 10485760; // Max File Size IN BYtes
      $accepted = array('png', 'jpg', 'jpeg','JPEG', 'gif', 'ico', 'tif', 'bmp', 'PNG');
      $length = 10;
      $randomString = substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, $length);
  
      if($_SERVER['REQUEST_METHOD'] == 'POST') {
  
          preg_match('/\.([a-zA-Z]+?)$/', $_FILES['userfile']['name'], $matches);
  
          if(in_array(strtolower($matches[1]), $accepted)) {
  
              if($_FILES['userfile']['size'] &lt;= $maxsize) {
  
                  $newname = md5_file($_FILES['userfile']['tmp_name']).'.'.$matches[1];
  
                  $browse = $_POST["browse"];
  
                  if ($browse = "1") {
                  $filedir = 'img';
                  } else {
                  $filedir = 'noimg';
                  }
  
                  move_uploaded_file($_FILES['userfile']['tmp_name'], $filedir.'/'.$newname);
  
                  header("Location: index.php?p=uploaded&amp;img=$newname");
              } else 
                  header("Location: index.php?p=error&amp;num=2");
          } else
          header("Location: index.php?p=error&amp;num=1");
      }
      ?&gt;  
  </code></pre>
  
  <p>The portion after $_POST["browse"] is not working. The purpose of this script is to put images in a folder that is either public, or private after upload. I am also curious to whether or not this upload script is secure.</p>