Variable sent through POST Method brings lots of blank spaces PHP
<p>Thanks everyone adding the name to the select tag did the trick.</p>

<p>but now the value that is sent trough the post method is something like this </p>

<pre><code>$_document =                   Andres
</code></pre>

<p>with lots of blank spaces and i wish to obtain something clean like</p>

<pre><code>$_document=Andres
</code></pre>

<p>Any ideas? </p>

<p>I'm having troubles with a variable that needs to be sent through POST method. Heres the code:</p>

<pre><code> &lt;td&gt;
   &lt;label&gt;Nombre&lt;/label&gt;&lt;input type="text" id="_name" name="_name" value="&lt;?=$_name?&gt;" class="name" /&gt;
   &lt;label&gt;URL&lt;/label&gt;&lt;input type="text" id="_permalink" name="_permalink" value="&lt;?=$_permalink?&gt;" class="name" /&gt;
   &lt;label&gt;Fecha&lt;/label&gt;&lt;input type="text" id="_date" name="_date" value="&lt;?=date_to_javascript_short($_date)?&gt;" /&gt;
   &lt;input type="checkbox" id="_featured" value="s" name="_featured" class="checkbox" &lt;?= $_featured == "s" ? "checked='checked'" : "" ?&gt; /&gt;&lt;label for="_featured" class="checkbox"&gt;Marcar como relevante&lt;/label&gt;

  &lt;label&gt;Carpeta&lt;/label&gt;

  **&lt;select&gt;
      &lt;?  $document = process_all("SELECT _document_name FROM _document WHERE _owner = 'Marco Regulatorio' ORDER BY _document_name ");
      if($document) {
       foreach ($document as $item) {
         echo "&lt;option id='_document' value=' ";?&gt;
         &lt;?=$_document=$item[_document_name]?&gt;
         &lt;?echo "'&gt;";
         echo "$item[_document_name] &lt;/option&gt;";        
        }
      }
        ?&gt;
      &lt;/select&gt;**
   &lt;/td&gt;
</code></pre>

<p>The <code>$_name</code>, <code>$_permalink</code> and other variables are sent correctly using the post method the one that gives the problem is the one in the select tag, the <code>$_document</code> variable, first to explain is that I get the content for the options tag using a DB, then I set the options that will show using PHP for it but I really don't get why wont it send the $_document variable using the post method.</p>
