oara no meterte en problemas de sql y la sintaxis cambia esta linea
Código PHP:
$sql="Select * from $tb_nombre where rut='$usuario1' and password='$password1'";
por esta:
Código PHP:
$sql="Select * from ".$tb_nombre." where rut='".$usuario1."' and password='".$password1."'";
y si quitaste la liea de "desconectar();"??