Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
<?php
include "koneksi.php";
$id=$_GET['id'];
if($query)
alert('Deleted');
window.location.href='view.php';
</script>
";
?>
EDIT
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div align="center">
<?php
include "koneksi.php";
?>
<?php
$id = $_POST['id'];
?>
Masukkan Umur : <input type="text" name="umur" value="<?php echo $data['umur']; ?>" />
<?php } ?>
</form>
</div>
</body>
</html>
Index
<!DOCTYPE html>
<html>
<head>
<style>
input[type=text], select
width: 100%;
margin: 8px 0;
display: inline-block;
border-radius: 4px;
box-sizing: border-box;
input[type=submit]
width: 100%;
background-color: #4CAF50;
color: white;
margin: 8px 0;
border: none;
border-radius: 4px;
cursor: pointer;
}
input[type=submit]:hover
background-color: #45a049;
div
border-radius: 5px;
background-color: #f2f2f2;
padding: 20px;
</style>
<body>
<div align="center">
</form>
</div>
</body>
</head>
</html>
Insert
<?php
include "koneksi.php";
$nama = $_POST['nama'];
$umur = $_POST['umur'];
?>
KONEKSI
<?php
if($host)
else
if($db)
{
else
?>
UPDATE
<?php
include "koneksi.php";
$id = $_POST['id'];
$nama = $_POST['nama'];
$umur = $_POST['umur'];
if ($query)
alert('Updated');
window.location.href='view.php';
</script>
";
}
?>
VIEW
<!DOCTYPE html>
<html>
<head>
<style>
table
border-collapse: collapse;
width: 100%;
th, td
text-align: left;
padding: 8px;
tr:nth-child(even){background-color: #f2f2f2}
th
background-color: #4CAF50;
color: white;
}
</style>
<body>
<div align="center">
<?php
include "koneksi.php";
?>
<table cellspacing="5">
<th> id </th>
<th> </th>
<?php
?>
<tr>
</tr>
<?php } ?>
</table>
</div>
</body>
</head>
</html>