scriptimi ve sunucuyu test etmek için yeni bir tablo oluşturup aşağıdaki sayfayı kaydettim.
hiçbir hata vermediği halde veritabanına satırı eklemiyor.
bunun nedeni ne olabilir sizce, yardıcı olursanız sevinirim...
<?php
try {
$db = new PDO('mysql: Host=localhost;dbname=test','root,'root');
$ad = 'CORC';
$sonuc=$db->exec("INSERT INTO kullanici(username) VALUES('$ad')");
echo $sonuc . ' satir eklendi';
} catch (PDOException $e) {
echo 'HATA: ' .$e->getMessage();
}
?>