title: unable to list values in LOV from mysql table using php
body: <p>unable to list the information in LOV list from mysql table . I need to list the categories(catname)  in the dropdown box and also let me know how to select the value(catno) for further action. </p>
  
  <pre><code>    &lt;?php
  require_once('dbconnect.php');
  
  $selsql="SELECT catno,catname FROM category"; //catno-integer and catname-
  varchar
  $res=mysqli_query($con,$selsql);
  //$r=mysqli_fetch_assoc($res);
  if (mysqli_query($con,$selsql)) {
  }
  else
  {
  echo "No connection";
  die(mysqli_error($con));
  }
  ?&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;Drop down list &lt;/title&gt;
  &lt;meta charset=UTF-8"&gt;
  &lt;meta name="viewport"&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;select name="categories" 
  style="width:250px;"onchange="this.form.submit();"&gt;
  &lt;?php while($row=mysqli_fetch_assoc($res)):;?&gt;
  &lt;option value="&lt;?php echo $row[0];?&gt;"&lt;?php echo $row[1];?&gt;&lt;/option&gt;
  &lt;?php endwhile;?&gt;
  &lt;!---&lt;option value="&lt;?php echo $row[0];?&gt;""&lt;?php echo $row[1];?&gt;"&lt;/option&gt;-&gt;
  &lt;!----$options.='&lt;option value="'.$row[0].'"selected&gt;'.$row[1].'&lt;/option&gt;'-&gt;
  
  &lt;/select&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>