title: Multi-word $GET variable problemin PHP
body: <p>I am currently writing some search engine, where this page is retrieving some _GET variables from a previous page. This is working as intended.</p>
  
  <p>Now I am using those variables as default value in a POST form. However, for some reason, only the first word for each of them is showing up. The form code is as follows:</p>
  
  <pre><code>&lt;form action = "insert.php" method = 'POST'&gt;
  &lt;Place name &lt;input type="text" name="name" size = "30" value= &lt;?php echo $_GET['name']; ?&gt; /&gt;
  </code></pre>
  
  <p>Note that when echoing $_GET['name'] anywhere else in the page, everything is fine. Multiple words show up as expected, but when I use it as a text box default value, only the first word shows up on the textbox. </p>
  
  <p>At first, I thought it had something to do with the way those $_GET variables are sent in the URL so I tried this:</p>
  
  <pre><code>$fullname = array();
  
   $fullname = explode("%20", $_GET['name']);
  
   $aaa = implode (' ',$fullname);
  </code></pre>
  
  <p>...</p>
  
  <pre><code>Place name &lt;input type="text" name="name" size = "30" value= &lt;?php echo $aaa; ?&gt; /&gt;
  </code></pre>
  
  <p>but the result is still the same. If I echo it anywhere else in the page I get the full string, but if it's inside the form only the first word shows up.</p>
  
  <p>What am I missing here?  </p>