
<?php
	 include('koneksi.php');
if (isset ($_POST ['simpan_user']))
{
	 	$nama  = $_POST['nama'];
    	$username  = $_POST['Username'];
    	$password  = $_POST['Password'];
    	$email = $_POST['Email'];
    	$jkel  = $_POST['Jkel'];
		$level  = $_POST['level'];
		$status  = $_POST['status'];
   		 $bobot = $_POST['bobot'];

     $query = "INSERT INTO admin(nama_lengkap,username,password,Email,Jkel,level,status_admin) VALUES('$nama','$username','$password','$email','$jkel','$level','$status')";
    $hasil = mysql_query($query);
   
   if($hasil){
		header('Location: admin.php');
	}
	else{
		echo "gagal menginput";
		}
mysql_close();
}
	
elseif (isset ($_POST ['simpan_dtesting']))
{$sql9 = mysql_query("TRUNCATE TABLE datauji");
	 	
		$namat= $_POST['namat'];
		$x1t  = $_POST['x1t'];
		$x2t  = $_POST['x2t'];
		$x3t  = $_POST['x3t'];
		$x4t  = $_POST['x4t'];
		$x5t  = $_POST['x5t'];
		$x6t  = $_POST['x6t'];
		$x7t  = $_POST['x7t'];
		$x8t  = $_POST['x8t'];
		$x9t  = $_POST['x9t'];
		$x10t  = $_POST['x10t'];
		$x11t  = $_POST['x11t'];
		$x12t  = $_POST['x12t'];
		$x13t  = $_POST['x13t'];
		$x14t  = $_POST['x14t'];
		$x15t  = $_POST['x15t'];
		$x16t  = $_POST['x16t'];
		$x17t  = $_POST['x17t'];
		$x18t  = $_POST['x18t'];
		$x19t  = $_POST['x19t'];
		$x20t  = $_POST['x20t'];
		
		
		echo $namat;
		echo $x1t;
		echo $x2t;
		echo $x3t;
		echo $x4t;
		echo $x5t;
		echo $x6t;
		echo $x7t;
		echo $x8t;
		echo $x9t;
		echo $x10t;
		echo $x11t;
		echo $x12t;
		echo $x13t;
		echo $x14t;
		echo $x15t;
		echo $x16t;
		echo $x17t;
		echo $x18t;
		echo $x19t;
		echo $x20t;
		
		 				
	$queryT="INSERT INTO datauji VALUES('$namat','$x1t','$x2t','$x3t','$x4t','$x5t','$x6t','$x7t','$x8t','$x9t','$x10t','$x11t','$x12t','$x13t','$x14t','$x15t','$x16t','$x17t','$x18t','$x19t','$x20t')"; 
    $hasilT= mysql_query($queryT);
   
   if($hasilT){
		header('Location: analisa.php');
	}
	else{
		echo "Gagal Proses";
		}
		
mysql_close();
}
	elseif (isset ($_POST ['simpan_data1']))
{
	 	
		$no  = $_POST['no'];
		$tetangga = $_POST['tetangga'];
		$yt = $_POST['yt'];
		$x1 = $_POST['x1'];
		$x2 = $_POST['x2'];
		$x3 = $_POST['x3'];
		$x4 = $_POST['x4'];
		$x5 = $_POST['x5'];
		$x6 = $_POST['x6'];
		$x7 = $_POST['x7'];
		$x8 = $_POST['x8'];
		$x9 = $_POST['x9'];
		$x10 = $_POST['x10'];
		$x11 = $_POST['x11'];
		$x12 = $_POST['x12'];
		$x13 = $_POST['x13'];
		$x14 = $_POST['x14'];
		$x15 = $_POST['x15'];
		$x16 = $_POST['x16'];
		$x17 = $_POST['x17'];
		$x18 = $_POST['x18'];
		$x19 = $_POST['x19'];
		$x20 = $_POST['x20'];
		
  			
  		
		
		$query = "INSERT INTO data1(no,tetangga,yt,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20) VALUES ('$no','$tetangga','$yt','$x1','$x2','$x3','$x4','$x5','$x6','$x7','$x8','$x9','$x10','$x11','$x12','$x13','$x14','$x15','$x16','$x17','$x18','$x19','$x20')";
    $hasil = mysql_query($query);
   
  
   if($hasil){
		header('Location: kknc.php');
	}
	else{
		echo "Gagal Menyimpan ";
		}
mysql_close();
}

?>

