<?php
	require_once("koneksi.php");
    include 'header.php';
?>

	<!-- breadcrumbs -->
		<div class="breadcrumbs">
			<div class="container">
				<ol class="breadcrumb breadcrumb1">
					<li><span><i class="fa fa-sign-in" aria-hidden="true"></i><a href="login.php"> Masuk</a></span></li>
					<li class="active">Form Kelola Artikel</li>
				</ol>
			</div>
		</div>
	<!-- //breadcrumbs -->
	<!-- register -->
		<div class="register">
			<div class="container">
				<h2>Edit Data Artikel</h2>
				<div class="login-form-grids">
					<h5>Data Artikel</h5>
					<?php
						$id_article = mysqli_real_escape_string($_GET['id']);
						$cari 		= mysqli_query($koneksi, "SELECT * FROM t_artikel WHERE id_artikel='$id_article'")or die(mysqli_error());
						while($data = mysqli_fetch_array($cari)){
					?>	
					<form  action="editarticle_process.php" method="POST" enctype="multipart/form-data">
						<input type="hidden" name="id" placeholder="id_artikel" value="<?php echo $data['id_artikel'] ?>" >
						<b>Judul Artikel 	:</b>
						<input type="text" name="judul_artikel" placeholder="Judul Artikel" value="<?php echo $data['judul_artikel'] ?>" >
						<b><br>Isi Artikel 		: <br></b>
						<textarea name="isi_artikel" placeholder="<?php echo $data['isi_artikel'] ?>" value="<?php echo $data['isi_artikel'] ?>"></textarea>
						<b><br>Gambar 		: <br></b>
						<input type="file" name="gambar_artikel" value=" ">
						<input type="submit" name="edit" value="edit">
					</form>
					<?php 
						}
					?>
				</div>
				<div class="register-home">
					<a href="processarticle.php">BATAL</a>
				</div>
			</div>
		</div>
	<!-- //register -->
	
<?php
	include 'footer.php';
?>