Fakat " rowcount " işlem yapmıyor (hatada vermiyor),
Yardımcı olur musunuz?
<?php
require_once 'baglan.php';
if (isset($_POST['musteri-kayit'])) {
$varmi = $db->prepare("SELECT * FROM musteri WHERE tc_no=:tc_no");
$varmi->execute([':tc_no' => $tc_no]);
if($varmi->rowCount()){
echo "var";
}else{
$kayit=$db->prepare("INSERT into musteri SET
tc_no=:tc_no,
title=:title,
telefon=:telefon");
$create=$kayit->execute(array(
'tc_no'=> trim($_POST['tc_no']),
'title'=> trim($_POST['title']),
'telefon'=> trim($_POST['telefon'])
));
if ($create) {
header("location:index.php");
}
else{
echo "Bilinmeyen Bir Hata Oluştu";
}
}
}
?>