title: How to retrieve data from MySQL database and display value in a text field
body: <p>I want to retrieve info from the following table and display it in a text field</p>
  
  <p>I have a table named <code>items</code>. Within <code>items</code> I have the fields <code>item_number</code>, <code>description</code>, <code>item_id</code>, <code>custom1</code>, <code>custom2</code>, <code>custom3</code>, <code>custom4</code></p>
  
  <p>How do I echo or print the value of the custom fields?</p>
  
  <pre class="lang-php prettyprint-override"><code>mysql_connect("####", "####", "####") or die(mysql_error());
  mysql_select_db("####") or die(mysql_error());
  
  // Get all the data from the "example" table
  $result = mysql_query("SELECT * FROM items") or die(mysql_error());
  while($row = mysql_fetch_array($result))
  {
    echo '&lt;input type="text" value='.$row['custom1'].'&gt;&lt;br/&gt;'; 
  }
  </code></pre>