try {
         $db = new PDO("mysql:host=localhost;dbname=test", "root", "123456");
    } catch ( PDOException $e ){
         print $e->getMessage();
    }

    $isim = $_POST['gelenisim'];
    $sql = "SELECT COUNT(isim) AS num FROM uyeler WHERE isim = :isim";
    $isimsorgu = $db->prepare($sql);
    $isimsorgu->bindValue(':isim', $isim);
    $isimsorgu->execute();
    $sorgula = $isimsorgu->fetch(PDO::FETCH_ASSOC);
    if($sorgula['num'] > 0){
        $isimvarmi = "Var";
    }else
    {
    echo "Yok";    
    }