Podrías probar con:
$consulta = "SELECT LOCALIZACION FROM SENSORESDIS WHERE ID_SENSOR ='$idvendor'";
$result = mysqli_query($connection,$consulta);
$row = mysqli_fetch_row($result);
$localizacion = $row[0];
Podrías probar con:
$consulta = "SELECT LOCALIZACION FROM SENSORESDIS WHERE ID_SENSOR ='$idvendor'";
$result = mysqli_query($connection,$consulta);
$row = mysqli_fetch_row($result);
$localizacion = $row[0];