<LINK href="../images/index.css" rel="stylesheet" type="text/css">
<?PHP

$agenda1 = $_POST["agenda"];
$tgl1 = $_POST["tglagenda"];
$acara1 = $_POST["acara"];
$tempat1 = $_POST["tempat"];
$fungsi1 = $_POST["fungsi"];
//$i_identitas1="{$_POST[a1]}|{$_POST[a2]}|{$_POST[a3]}|{$_POST[a4]}|{$_POST[a5]}|{$_POST[a6]}|{$_POST[a7]}|{$_POST[a8]}|{$_POST[a9]}|{$_POST[a10]}|{$_POST[a11]}|{$_POST[a12]}";
$error = "";
if ($agenda1 == ""){$error = "NO AGENDA TIDAK BOLEH KOSONG<BR>";}
if ($tgl1 == ""){$error = "TANGGAL PELAKSANAAN TIDAK BOLEH KOSONG<BR>";}
if ($acara1  == ""){$error = "ACARA TIDAK BOLEH KOSONG<BR>";}
if ($tempat1 == ""){$error = "TEMPAT ACARA TIDAK BOLEH KOSONG<BR>";}
mysql_connect("localhost", "root", "benk");
mysql_select_db("etuna");


if ($fungsi1 == "edit"){
$query = "UPDATE agenda Set d_tgl = '$tgl1' where d_agenda = '$agenda1'";  
$result = mysql_query($query); 
$query = "UPDATE agenda Set d_acara = '$acara1' where d_agenda = '$agenda1'";  
$result = mysql_query($query); 
$query = "UPDATE agenda Set d_tempat = '$tempat1' where d_agenda = '$agenda1'";  
$result = mysql_query($query); 
print ('<table width="100%"  border="0" cellspacing="1" cellpadding="1">
  <tr>
    <td><table width="100%"  border="0" cellspacing="4" cellpadding="4">
      <tr>
        <td><a href="../index.page.php?g=agenda&d=inc" class="menudatun">BERHASIL MELAKUKAN EDITING<a></td>
      </tr>
    </table></td>
  </tr>
</table>');

}
if ($fungsi1 == "delete"){
$query = "DELETE FROM agenda WHERE d_agenda = '$agenda1'";
$result = mysql_query($query); 
print ('<table width="100%"  border="0" cellspacing="1" cellpadding="1">
  <tr>
    <td><table width="100%"  border="0" cellspacing="4" cellpadding="4">
      <tr>
        <td><a href="../index.page.php?g=agenda&d=inc" class="menudatun">BERHASIL MELAKUKAN DELETE<a></td>
      </tr>
    </table></td>
  </tr>
</table>');
} 
?>

