<?php
// Include the database connection file
session_start();
include "menuadmin.php";
include 'config.php';


if (isset($_POST['updaterppguru'])) 
{
	$koderpp=$_POST['ikoderpp'];
    $ntglkirim= date("Y/m/d");
	$nvalidasi="kirim";
	$nkaldik=addslashes($_POST['ikalender']);
	$nrpe=addslashes($_POST['irpe']);
	$nanalisis=addslashes($_POST['ianalisis']);
	$ncp=addslashes($_POST['icp']);
	$ntp=addslashes($_POST['itp']);
	$nprota=addslashes($_POST['iprota']);
	$npromes=addslashes($_POST['ipromes']);
	$nkktp=addslashes($_POST['ikktp']);
	$nmodul=addslashes($_POST['imodul']);
	$nkbc=addslashes($_POST['ikbc']);

	
	
	

		// Update the database table
		$result = mysqli_query($mysqli, "UPDATE `drpp` SET `tglkirim` = '$ntglkirim', `validasi` = '$nvalidasi', `kaldik` = '$nkaldik',`rpe` = '$nrpe',`alokasiwaktu` = '$nanalisis',`cp` = '$ncp',`atp` = '$ntp',`prota` = '$nprota',`promes` = '$npromes',`kktp` = '$nkktp',`modulrpp` = '$nmodul',`peta_cp` = '$nkbc' WHERE `drpp`.`Idrpp` = $koderpp;");
		
		// Display success message
		echo "<p><font color='green'>Data updated successfully!</p>";
		echo "<br> ";
		header("location:lihatkerjaguru.php?ed=1");
		
	}
