The mysqli_query()
function in procedural mode waits for a parameter variable to create a connection with the bank and the one with the query itself, you are just passing the query.
Try this:
$link = mysqli_connect("localhost", "my_user", "my_password", "dbname");
$verifica = mysqli_query($link, "SELECT * from dados WHERE login='$login'");
$array = mysqli_fetch_array($verifica);
$array['senha'];
However, the query would be very vulnerable in this way, you could parameterize this query, like this:
$link = mysqli_connect("localhost", "my_user", "my_password", "dbname");
//prepara a query pra receber o parametro ?
$stmt = mysqli_prepare($link, "SELECT senha from dados WHERE login= ?");
//passa o parametro e o tipo("s" quer dizer string)
mysqli_stmt_bind_param($stmt, "s", $login);
//executa a query
mysqli_stmt_execute($stmt);
//vincula o retorno a variavel $verifica
mysqli_stmt_bind_result($stmt, $verifica);
mysqli_stmt_fetch($stmt);
printf($verifica);// exibe a senha
/* fecha o statement */
mysqli_stmt_close($stmt);
This narrows the vulnerability a bit, but does not mean that the code is safe with just that.