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


if (isset($_POST['update'])) 
{
	$kodecetak=addslashes($_POST['ikodecetak']);
    $kop1=addslashes($_POST['ikop1']);
	$kop2=addslashes($_POST['ikop2']);
	$kop3=addslashes($_POST['ikop3']);
	$kop4=addslashes($_POST['ikop4']);
	$kepala=addslashes($_POST['ikepala']);
	
	
	

		// Update the database table
		$result = mysqli_query($mysqli, "UPDATE `print` SET `kop1`='$kop1',`kop2`='$kop2',`kop3`='$kop3',`kop4`='$kop4',`kepala`='$kepala' WHERE `Idcetak`='$kodecetak'");
		
		// Display success message
		echo "<p><font color='green'>Data updated successfully!</p>";
		echo "<br>  ";
		header("location:setingcetak.php?ed=1");
		
	}
