<?php
	include("config.php");
	$deskripsi=mysqli_real_escape_string($mysqli,$_POST["txtDeskripsi"]);

	$srcfile=$_FILES["txtFile"]["tmp_name"];
	$nmfile=$_FILES["txtFile"]["name"];

	move_uploaded_file($srcfile, "../file/$nmfile");

	$sql="INSERT INTO produk_hukum VALUES (null, '$deskripsi','$nmfile')";
	
	$qry=mysqli_query($mysqli,$sql);
	
	if($qry){
	
		msgbox("Data produk hukum berhasil disimpan");
		lempar("admin.php?page=ls_produk&page_desc=Daftar Produk Hukum");
	}else{
		
		msgbox("Error: ".mysqli_error($mysqli));
		lempar("admin.php?page=ls_produk&page_desc=Daftar Produk Hukum");
	}
	
	
	
?>