Notice: Undefined variable: confirmation in C:\xampp\htdocs\RustoleumCustomCMS\administrator\admin.php on line 126
if (!empty($_REQUEST['id']) && !empty($_REQUEST['mode'])){
if ($_REQUEST['mode'] == "delete"){
$id = $_REQUEST['id'];
$result = mysql_query("DELETE FROM static_page WHERE id =".$id) or die(mysql_error());
$confirmation = ($result) ? "Data telah terhapus." : "Gagal menghapus data.";
}
}
?>
<div align="center">
<div style="width:700px;text-align:left;padding-top:5px;">
<?php echo $confirmation; ?>
<form method="get" action="<?php $_SERVER['PHP_SELF'] ?>">
<br/>
<a class="topLink" href="input_berita_static.php">Berita Static Baru >></a><br><br>
<?php
//LOAD NEWS
$result = mysql_query("SELECT * FROM static_page") or die(mysql_error());
?>
<table border="1" cellpadding="2" cellspacing="0">
<tr>
<th>Static Page</th><th>Judul</th><th>Action</th>
</tr>
<?php
while ($data = mysql_fetch_array($result)){
echo '<tr>';
echo '<td>'.$data['page'].'</td>';
echo '<td>'.$data['judul'].'</td>';
echo '<td><a href="admin.php?mode=delete&id='.$data['id'].'">Hapus</a> |<a href="input_berita_static.php?id='.$data['id'].'">Edit</a></td>';
echo '</tr>';
}
?>
</table>
line 126: <?php echo $confirmation; ?>