Ajax Kodum
function kullanicilar()
{
var kullanicim = $("#kullaniciguncelle").serialize();
$.ajax({
type :"POST",
data : "kullanicim",
url : "inc/inc.php",
success : function(kullaniciverisi)
{
if($.trim(kullaniciverisi)=="bos")
{
sweatAlert("hata","Lütfen Boş Alanları Doldurunuz..","error");
}else if($.trim(kullaniciverisi)=="ok")
{
sweatAlert("basarili","Başarıyla Güncellendi","success");
}
}
});
}Aldığım veri <form action="" method="POST" id="kullaniciguncelle" onsubmit="return false;">
<div class="card-body">
<div class="form-group">
<label for="exampleInputEmail1">Kullanıcı Adı</label>
<input type="text" name="kullanici_adi" class="form-control" value="<?= getid('kullanici_adi');?>">
</div>
<div class="form-group">
<label for="exampleInputPassword1">Kullanıcı Mail</label>
<input type="text" name="kullanici_mail" class="form-control" id="" value="<?= getid('kullanici_mail');?>">
</div>
<div class="form-group">
<label for="exampleInputPassword1">Kullanıcı Şifre</label>
<input type="password" name="kullanici_sifre" class="form-control" id="" value="<?= getid('kullanici_sifre');?>">
</div>
<div class="form-group">
<label for="exampleInputPassword1">Kullanıcı Cinsiyet</label>
<input type="text" name="kullanici_cinsiyet" class="form-control" id="" value="<?= getid('kullanici_mail');?>">
</div>
<div class="form-group">
<label for="exampleInputPassword1">Kullanıcı Yaş</label>
<input type="text" name="kullanici_yas" class="form-control" id="" value="<?= getid('kullanici_yas');?>">
</div>
<div class="form-group">
<label for="exampleInputPassword1">Kullanıcı Meslek</label>
<input type="text" name="kullanici_meslek" class="form-control" id="" value="<?= getid('kullanici_meslek');?>">
</div>
<div class="form-group">
<label for="exampleInputPassword1">Kullanıcı Şehir</label>
<input type="text" name="kullanici_sehir" class="form-control" id="" value="<?= getid('kullanici_sehir');?>">
</div>
<div class="form-group">
<label for="exampleInputPassword1">Kullanıcı Unvan</label>
<input type="text" name="kullanici_unvan" class="form-control" id="" value="<?= getid('kullanici_unvan');?>">
</div>
<div class="form-group">
<label for="exampleInputPassword1">Kullanıcı Durum</label>
<input type="text" name="kullanici_durum" class="form-control" id="" value="<?= getid('kullanici_durum');?>">
</div>
<input type="hidden" name="kullanici_id" id="kullanici_id" value="<?=getid('kullanici_id');?>">
<div class="card-footer">
<button class="btn btn-primary" onclick="kullanicilar();">Güncelle</button>
</div>
</form>
</div>Tanımsız Veri hatası aldığım yer inc.phpif($_POST)
{
echo $_POST['kullanici_adi'];
}