title: Values retrieved from database in textbox missing after spaces
body: <p>This is for edit_inv.php which have some textboxes which users can edit.<br>
  The problem is for values that contains spaces. eg. Cisco Router (in phpmyadmin), when I printout the value in the textbox (to be edited or left the way it is) it only have Cisco. The word Router is missing. This would be bad if the user don't want to edit the Cisco Router part and would have to type Router again. </p>
  
  <p>The editing script works. Just that everything after a space isn't on the textbox.</p>
  
  <p>I'm just starting php and would appreciate some help.</p>
  
  <pre><code>&lt;?php
  
  //  Mysql Connect
  include('lock.php');
  require_once('mysql.php');
  $edit_inv = $_GET['inventory_id'] ;
  
  $_SESSION['edit_inv'] = $edit_inv; 
  
  $query = "SELECT * FROM inventory WHERE unikl_id= $login_session_id and inventory_id='$edit_inv'";
  $result = mysql_query($query);
  
      echo '&lt;form method="post" action="handle_inv_edit.php"&gt;';
          // Table header.
      echo '&lt;table align="center" cellspacing="0" cellpadding="5" border="2"&gt;
      &lt;tr&gt;
      &lt;td align="center"&gt;&lt;b&gt;Inventory ID&lt;/b&gt;&lt;/td&gt;
      &lt;td align="center"&gt;&lt;b&gt;Device Name&lt;/b&gt;&lt;/td&gt;
      &lt;td align="center"&gt;&lt;b&gt;Quantity&lt;/b&gt;&lt;/td&gt;
      &lt;td align="center"&gt;&lt;b&gt;Level/Room&lt;/b&gt;&lt;/td&gt;
      &lt;td align="center"&gt;&lt;b&gt;Email&lt;/b&gt;&lt;/td&gt;
      &lt;td align="center"&gt;&lt;b&gt;Availability&lt;/b&gt;&lt;/td&gt;
      &lt;/tr&gt;';
  
          // Fetch and print all the records.
          while ($row = mysql_fetch_array($result)) {
          echo    '&lt;tr&gt;
                  &lt;td align="center"&gt;' . $row['inventory_id'] . '&lt;/td&gt;
  
                  &lt;td align="left"&gt;&lt;input type="text" size="60" 
                  name="pro_name" value='.$row['pro_name'].'&gt;&lt;/td&gt;
  
                  &lt;td align="left"&gt;&lt;input type="text" size="4" 
                  name="quantity" value='.$row['quantity'].'&gt;&lt;/td&gt;
  
                  &lt;td align="center"&gt;&lt;input type="text" size="4" 
                  name="level" value='.$row['level'].'&gt;&lt;/td&gt;
  
                  &lt;td align="left"&gt;&lt;input type="text" size="60"
                  name="email" value='.$row['email'].'&gt;&lt;/td&gt;
  
                  &lt;td align="left"&gt;&lt;input type="radio" name="available" value="Yes" CHECKED &gt; Yes 
                          &lt;input type="radio" name="available" value="No"&gt; No&lt;/td&gt;
  
  
                  &lt;/tr&gt;';
      }
      echo '&lt;/table&gt;';
  
      echo '&lt;br /&gt;&lt;div align="center"&gt;&lt;input type="submit" 
      name="Submit" value="Edit" /&gt;&lt;/div&gt;
      &lt;input type="hidden" name="submitted" value="TRUE" /&gt;';
  
      echo '&lt;/form&gt;';
  ?&gt;
  </code></pre>