Merhaba,
Kodlarım doğru olmasına rağmen yaptığım admin panelinden veritabanına kullanıcı eklemeye çalıştığımda, kayıt ekle butonuna bastığımda işlem başarısız hatası alıyorum.
Muhtemelen ufak bir şey eksik ama bilgisizliğimden bilmiyorum.
Bilgisayarıma teamviewer ile bağlanıp birkaç dakikasını ayırabilecek olursa çok sevinirim.
Teşekkürler.
Admin panelden kullanıcı ekleme de işlem başarısız hatası, yardım
8
●133
- 29-08-2020, 13:06:46Tabii ki,otukenwebtr adlı üyeden alıntı: mesajı görüntüle
kullanici-ekle sayfam
<?php include 'header.php'; ?> <!-- page content --> <div class="right_col" role="main"> <div class=""> <div class="clearfix"></div> <div class="row"> <div class="col-md-12 col-sm-12 col-xs-12"> <div class="x_panel"> <div class="x_title"> <h2>Kullanıcı Ekle<small>, <?php if ($_GET['durum']=="ok") {?> <b style="color:green;">İşlem Başarılı...</b> <?php } elseif ($_GET['durum']=="no") {?> <b style="color:red;">İşlem Başarısız...</b> <?php } ?> </small></h2> <div class="clearfix"></div> </div> <div class="x_content"> <br /> <!-- / => en kök dizine çık ... ../ bir üst dizine çık --> <form action="../netting/islem.php" method="POST" id="demo-form2" data-parsley-validate class="form-horizontal form-label-left"> <div class="form-group"> <label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">Kullanıcı TC <span class="required">*</span> </label> <div class="col-md-6 col-sm-6 col-xs-12"> <input type="text" id="first-name" name="kullanici_tc" placeholder="Kullanıcı tc giriniz" class="form-control col-md-7 col-xs-12"> </div> </div> <div class="form-group"> <label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">Kullanıcı Ad Soyad <span class="required">*</span> </label> <div class="col-md-6 col-sm-6 col-xs-12"> <input type="text" id="first-name" name="kullanici_adsoyad" placeholder="Kullanıcı ad soyad giriniz" class="form-control col-md-7 col-xs-12"> </div> </div> <div class="form-group"> <label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">Kullanici Mail <span class="required">*</span> </label> <div class="col-md-6 col-sm-6 col-xs-12"> <input type="text" id="first-name" name="kullanici_mail" placeholder="Kullanıcı mail giriniz" required="required" class="form-control col-md-7 col-xs-12"> </div> </div> <div class="form-group"> <label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">Kullanıcı Telefon <span class="required">*</span> </label> <div class="col-md-6 col-sm-6 col-xs-12"> <input type="text" id="first-name" name="kullanici_gsm" placeholder="Kullanıcı telefon numarası giriniz" class="form-control col-md-7 col-xs-12"> </div> </div> <div class="form-group"> <label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">Kullanici Şifre <span class="required">*</span> </label> <div class="col-md-6 col-sm-6 col-xs-12"> <input type="text" id="first-name" name="kullanici_password" placeholder="Kullanıcı şifre giriniz" required="required" class="form-control col-md-7 col-xs-12"> </div> </div> <div class="form-group"> <label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">Kullanici İl <span class="required">*</span> </label> <div class="col-md-6 col-sm-6 col-xs-12"> <input type="text" id="first-name" name="kullanici_il" placeholder="Kullanıcı il giriniz" class="form-control col-md-7 col-xs-12"> </div> </div> <div class="form-group"> <label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">Kullanici İlçe <span class="required">*</span> </label> <div class="col-md-6 col-sm-6 col-xs-12"> <input type="text" id="first-name" name="kullanici_ilce" placeholder="Kullanıcı ilçe giriniz" class="form-control col-md-7 col-xs-12"> </div> </div> <div class="form-group"> <label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">Yetki <span class="required">*</span> </label> <div class="col-md-6 col-sm-6 col-xs-12"> <input type="text" id="first-name" name="kullanici_yetki" placeholder="Yetki giriniz(Normal kullanıcı ise 4 admin ise 5 giriniz)" required="required" class="form-control col-md-7 col-xs-12"> </div> </div> <input type="hidden" name="kullanici_id" value="<?php echo $kullanicicek['kullanici_id'] ?>"> <div class="ln_solid"></div> <div class="form-group"> <div align="right" class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3"> <button type="submit" name="kullaniciekle" class="btn btn-success">Kaydet</button> </div> </div> </form> </div> </div> </div> </div> <hr> <hr> <hr> </div> </div> <!-- /page content --> <?php include 'footer.php'; ?>bu de islem.php içerisindeki kodlar
if (isset($_POST['kullaniciekle'])) { $kaydet=$db->prepare("INSERT INTO kullanici SET kullanici_id=:kullanici_id, kullanici_tc=:kullanici_tc, kullanici_adsoyad=:kullanici_adsoyad, kullanici_mail=:kullanici_mail, kullanici_gsm=:kullanici_gsm, kullanici_password=:kullanici_password, kullanici_il=:kullanici_il, kullanici_ilce=:kullanici_ilce, kullanici_yetki=:kullanici_yetki "); $insert=$kaydet->execute(array( 'kullanici_id' => $_POST['kullanici_id'], 'kullanici_tc' => $_POST['kullanici_tc'], 'kullanici_adsoyad' => $_POST['kullanici_adsoyad'], 'kullanici_mail' => $_POST['kullanici_mail'], 'kullanici_gsm' => $_POST['kullanici_gsm'], 'kullanici_password' => $_POST['kullanici_password'], 'kullanici_il' => $_POST['kullanici_il'], 'kullanici_ilce' => $_POST['kullanici_ilce'], 'kullanici_yetki' => $_POST['kullanici_yetki'] )); if ($insert) { Header("Location:../production/kullanici.php?durum=ok"); } else { Header("Location:../production/kullanici.php?durum=no"); } } - 29-08-2020, 14:51:01
$query = $db->prepare("INSERT INTO kullanici SET kullanici_id = ?, kullanici_tc = ?, kullanici_adsoyad = ?, kullanici_mail = ?, kullanici_gsm = ?, kullanici_password = ?, kullanici_il = ?, kullanici_ilce = ?, kullanici_yetki = ?"); $insert = $query->execute(array( $_POST['kullanici_id'], $_POST['kullanici_tc'], $_POST['kullanici_adsoyad'], $_POST['kullanici_mail'], $_POST['kullanici_gsm'], $_POST['kullanici_password'], $_POST['kullanici_il'], $_POST['kullanici_ilce'], $_POST['kullanici_yetki'], )); if ( $insert ){ $last_id = $db->lastInsertId(); print "insert işlemi başarılı!"; } - 29-08-2020, 15:58:54mesajınız için teşekkür ederim, maalesef bu da olmadıarifcanekmekci adlı üyeden alıntı: mesajı görüntüle
- 29-08-2020, 16:05:01Hata kaydını iletir misiniz?Header.php içerisine girerek, <?php etiketinin hemen altına aşağıda ilettiğim kod yapıştırılır ise hata kayıtları ekrana gelecektir.
error_reporting(E_ALL); ini_set("display_errors" , 1); - 29-08-2020, 18:14:51Yoğun uğraşlar sonucu hatamı @ismailozkan; çözmüştür.ismailozkan adlı üyeden alıntı: mesajı görüntüle
Kendisine teşekkür ederim.