title: Errors in fetching data
body: <pre><code>&lt;?php 
  
  $serverName = "180.179.67.205"; 
  
  $connectionInfo = array( "Database"=&gt;"******", "UID"=&gt;"******", "PWD"=&gt;"********");
  
  $conn = sqlsrv_connect( $serverName, $connectionInfo);
  
  $sql= "Select Stateid,StateName from State_Master" ;
  
  $result = sqlsrv_query($sql);
  
  while($val=sqlsrv_fetch_object($result))
  
  {
  
  $id=$val['Stateid'];
  
  $name=$val['StateName'];
  
  }
  
  ?&gt;
  </code></pre>
  
  <p>//connection have been successfully created but while try to print  $id and  $name in a table, unfortunately there is nothing, no data, no error.</p>