<?php
	
	include("config.php");
	
	

	$admin_id 	 		= $_POST["txtIdAdmin"];
	$admin_name			= $_POST["txtNamaAdmin"];
	$pass_admin			= $_POST["txtPassAdmin"];
		
	if(empty($admin_id)){
		msgbox("Data isian administrator harus diisi!");
		lempar("admin.php?page=add_admin");
		die();
	}
	
	$sql="INSERT INTO admin VALUES ('$admin_id', '$admin_name', PASSWORD('$pass_admin'))";
	
	mysqli_query($mysqli,$sql);
	msgbox("Data administrator sudah tersimpan...");
	lempar("admin.php?page=ls_admin&page_desc=Daftar%20Administrator");


?>