title: PHP post does not work when data contains a space
body: <p>I've been developing a sport selection system where choose sports and have run into a problem where sports with spaces cannot be deleted. </p>
  
  <p>I've tracked this issue down to the post form, as the script that is meant to pick up the form doesn't when it contains a space. I've done extensive googling on this issue but haven't come up with anything, as all the other similar issues are with improperly configured forms.</p>
  
  <p>Here is the current code:</p>
  
  <p>Form code:</p>
  
  <pre><code>&lt;!--Remove Sport--&gt;
  &lt;form action="" id="RecSportRemoveForm" method="POST"&gt;
  
  &lt;p&gt;Remove Sport&lt;/p&gt;
  &lt;?php
  $sportFile = "recSport.data";
  $sportOptionsArray = unserialize(file_get_contents($sportFile));
  
  $sportLength = count($sportOptionsArray);
  
  for($i = 0; $i &lt; $sportLength; $i++) {
      echo ("&lt;input type='checkbox' name=$sportOptionsArray[$i] value=$sportOptionsArray[$i]&gt;$sportOptionsArray[$i]&lt;br&gt;");
  }
  echo ("&lt;br&gt;&lt;button type='submit'&gt;Remove&lt;/button&gt; &lt;br&gt;");
  
  ?&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Recieve code:(To clarify, I'm filtering and rearranging the keys in another place so that's not an issue)</p>
  
  <pre><code>      &lt;!--Checks Remove Sport--&gt;
        &lt;?php
        $sportFile = "recSport.data";
        $sportOptionsArray = unserialize(file_get_contents($sportFile));
  
  
         $sportLength = count($sportOptionsArray);
  
         for($i = 0; $i &lt; $sportLength; $i++) {
  
             if (isset($_POST[$sportOptionsArray[$i]]) == TRUE){
                 $removeSport = $_POST[$sportOptionsArray[$i]];
  
                 $key = array_search($removeSport, $sportOptionsArray);
                 unset($sportOptionsArray[$key]);
                 echo ($sportOptionsArray[$key]);
  
                 file_put_contents($sportFile, serialize($sportOptionsArray));
  
                 echo "&lt;script type='text/javascript'&gt;alert('Remove');&lt;/script&gt;";
                 echo "&lt;script type='text/javascript'&gt;alert($removeSport);&lt;/script&gt;";
  
                 echo "&lt;meta http-equiv='refresh' content=0;URL=adminDashboard.php&gt;";
             }
         }
  
        //echo "&lt;script type='text/javascript'&gt;alert('Remove');&lt;/script&gt;";
        //echo "&lt;script type='text/javascript'&gt;alert($removeSport);&lt;/script&gt;";
     ?&gt;
  </code></pre>
  
  <p>Any help or insight would be very much appreciated.</p>