sql server 2012 - No display of database names using php by a dropbown -
the names of database in sql server not displaying in drop down. here codes.can suggest solution.
<body> <?php $query = "select [name] master.dbo.sysdatabases dbid > 4"; $params = array(); $options = array( "scrollable" => sqlsrv_cursor_keyset ); $stmt = sqlsrv_query($conn, $query, $params, $options ); echo '<select name="test" style="width: 100px;>'; while( $row = sqlsrv_fetch_array ($stmt, sqlsrv_fetch_assoc)) { //unset($code); //$code= $row['org_code']; echo '<option value="'.$row['name'].'</option>'; } echo '</select>'; ?>
Comments
Post a Comment