$sorgu = $db->prepare("SELECT * FROM uyeler where UyeGiris='$id' and UyeSifre='$sifre'");
Şöyle dener misiniz?