php-crud/view.php
2020-01-02 23:21:46 +07:00

70 lines
1.9 KiB
PHP

<?php
include 'query.php';
$result = slcmhs($_GET['id']);
while($data = mysql_fetch_array($result)) {
$nim = $data['nim'];
$nama = $data['nama'];
$alamat = $data['alamat'];
$telp = $data['telp'];
$asal = $data['asal'];
$foto = $data['foto'];
}
?>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link href="style.css" rel="stylesheet">
<link href="bootstrap.min.css" rel="stylesheet">
<style type="text/css">
body{
background-color: #f3f3f3;
}
.container{
margin:100px;
background-color: #fff;
box-shadow:0 1px 3px rgba(0,0,0,.5);
padding: 10px;
}
</style>
</head>
<body>
<div class="container">
<div class="page-header">
<h1>Informasi</h1>
</div>
<table class="table">
<tr>
<td rowspan="5" width="200"><img src="<?php if (!empty($foto)) echo $foto; else echo 'upload/nophoto.jpg'; ?>" width="200" height="300"/></td>
<td width="100">Nama</td>
<td width="10">:</td>
<td><?php echo $nama; ?></td>
</tr>
<tr>
<td>NIM</td>
<td>:</td>
<td><?php echo $nim; ?></td>
</tr>
<tr>
<td>Alamat</td>
<td>:</td>
<td><?php echo $alamat; ?></td>
</tr>
<tr>
<td>Telp</td>
<td>:</td>
<td><?php echo $telp; ?></td>
</tr>
<tr>
<td>Sekolah Asal</td>
<td>:</td>
<td><?php echo $asal; ?></td>
</tr>
</table>
<div style="text-align:center;">
<a href="index.php"><button class="btn"><i class="icon-arrow-left"></i> Back</button></a>
<a href="<?php echo 'form.php?id='.$nim ?>"><button class="btn"><i class="icon-edit"></i> Update</button></a>
</div>
</div>
</body>
</html>