ozgun58 adlı üyeden alıntı: mesajı görüntüle
herkese selamlar kolay gelsin arkadaşlar
bu hatayı anlayamadım ne yapmam gerek bilen var mı sorun nere de

[url=https://hizliresim.com/zjYnM4][/url

kodlar

<?php    
$baglanti= new PDO("mysql:host=localhost;dbname=kisiler;charset=utf8","root","123456");
$baglanti->exec("SET NAMES utf8");
 

?>
<?php  




?>






<?php  


if (@$_POST["buton"]):

@$ad=htmlspecialchars($_POST["ad"]);
@$soyad=htmlspecialchars($_POST["soyad"]);

if (empty($ad) or empty($soyad));
echo "boş olamaz ";
else:
$baglanti->query("insert into kisisel (ad,soyad) VALUES ('$ad','$soyad')");
echo "başarılı";    
endif;

?>




<form action=" " method="post">

<input type="text" name="ad" />

<input type="text" name="soyad" />
<input type="submit" name="buton" value="EKLE" />

</form>
]

<?php
if(isset($_POST['buton'], $_POST['ad'], $_POST['soyad']) && !empty($_POST['ad']) && !empty($_POST['soyad'])) {
$ad = htmlspecialchars($_POST['ad']);
$soyad = htmlspecialchars($_POST['soyad']);
$baglanti->query('insert into kisisel(ad,soyad) VALUES ($ad, $soyad)');
} else {
echo 'boş olamaz';
}
?>
<form action="" method="post">
<input type="text" name="ad" />
<input type="text" name="soyad" />
<input type="submit" name="buton" value="EKLE" />
</form>