数据库行到HTML选择

I'm trying to populate my dropdown list with informations of my DB. I Use this code:

<select name="teste">
    <?php
    include "conecta.php";
    $sql = sqlsrv_query("select * from carro");
    sqlsrv_query($conn, $sql);
    while ($row = sqlsrv_fetch_array($sql)) {
        echo "<option value=\"teste1\">" . $row['placa'] . "</option>";
    }
    sqlsrv_close($conn);
    ?>
</select>

But don't appear any information in my list. Someone can help me to figure whats wrong in my code?

You are not making the query to the database correctly. This is then causing a PHP error and hence not executing the while loop. The line should be:

$sql = sqlsrv_query($conn, "select * from carro");

or

$query = "select * from carro";
$sql = sqlsrv_query($conn, $query);

You might also want to specify that you are wanting the associative array from the query response, as you are looking for $row['placa']. Like so:

while ($row = sqlsrv_fetch_array($sql, SQLSRV_FETCH_ASSOC)){...}