<?php
	if($_POST){
		$islem = $db->prepare("UPDATE sms SET kullanici_adi = ?, sifre = ?");
		$islem = $islem->execute(array($_POST['kullanici_adi'],$_POST['sifre']));
		if($islem){
			echo b();
		}else{
			echo h();
		}
	}
	$duzenle = $db->query("SELECT * FROM sms")->fetch(PDO::FETCH_ASSOC);
?>

<div class="page-header">
	<div class="page-leftheader">
		<h4 class="page-title">Email Ayarı</h4>
	</div>
	<div class="page-rightheader ml-auto d-lg-flex d-none">
		<ol class="breadcrumb">
			<li class="breadcrumb-item"><a href="index.php">Anasayfa</a></li>
			<li class="breadcrumb-item active" aria-current="page">Email Ayarı</li>
		</ol>
	</div>
</div>
						
<div class="row">
	
	<div class="col-md-12">
		<div class="card">
			<div class="card-body">
				<div class="row">
					<div class="col-md-12">
						
						<form class="form-horizontal" method="post" action="">

							<div class="form-group row">
								<label class="col-md-3 form-label">Kullanıcı Adı</label>
								<div class="col-md-9">
									<input type="text" class="form-control" name="kullanici_adi" value="<?php echo @$duzenle['kullanici_adi']; ?>">
								</div>
							</div>

							<div class="form-group row">
								<label class="col-md-3 form-label"> Şifre</label>
								<div class="col-md-9">
									<input type="text" class="form-control" name="sifre" value="<?php echo @$duzenle['sifre']; ?>">
								</div>
							</div>


							<div class="form-group row">
								<div class="col-md-12"><center><button type="submit" class="btn btn-info">Kaydet</button></center></div>
							</div>

						</form>

					</div>
				</div>
			</div>
		</div>
	</div>
</div>