I have the following codes:
$confirmation = ($result)? "Data telah terhapus.":"Gagal menghapus data.";
}elseif ($_REQUEST['mode'] == 'edit'){
$result = mysql_query("SELECT * FROM kategori_berita WHERE id=".$_REQUEST['id']) or die(mysql_error());
$data = mysql_fetch_array($result);
$id = $data['id'];
$kategori = $data['kategori'];
}
}
?>
<div align="center">
<div style="width:700px;text-align:left;padding-top:25px;">
<div class="pageTitle">Category Manager</div>
<?php echo $confirmation; ?><br/>
<form method="get" action="<?php $_SERVER['PHP_SELF'] ?>">
This error appears:
Category Manager
Notice: Undefined variable: confirmation in C:\xampp\htdocs\php_template2\category_manager.php on line 109
Line 109 is <?php echo $confirmation; ?><br/>
What's wrong with it? I thought I define it already.