Tabii ki,
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");
}
}