title: i am trying to display productname from newproduct mysql table into combobox. The following code is executing but its displaying a blank
body: <pre><code>**&lt;html&gt;
  &lt;body&gt;
  &lt;form name="call"&gt;
       &lt;select name="category"&gt;
  &lt;option&gt;Select a category&lt;/option&gt;
  &lt;?php
   mysql_connect("localhost","root","");
   mysql_select_db("shenvel");
   $category = "SELECT productname FROM newproduct";
   //retrieving product name alone from newproduct
   $query_result = mysql_query($category);
   while($result = mysql_fetch_assoc($query_result))
  {
      ?&gt;
          &lt;option value = "&lt;?php echo $result['productname']?&gt;"&gt;&lt;?php echo $result['productname']?&gt;&lt;/option&gt;  
  </code></pre>
  
  <p>//the above code displays the combo box with one empty space as output.<br>
          
      
      
  **</p>