<html xmlns="http://www.w3.org/1999/xhtml"> 
<?php
error_reporting(0);
?>  
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
	<meta http-equiv="Refresh" content="0; URL=nilai_k.php"> 
    <meta name="description" content="" />
    <meta name="author" content="" />
    <!--[if IE]>
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <![endif]-->
    <title> KLASIFIKASI STATUS EKONOMI</title>
    <!-- BOOTSTRAP CORE STYLE CSS -->
    <link href="assets/css/bootstrap.css" rel="stylesheet" />
    <!-- FONTAWESOME STYLE CSS -->
    <link href="assets/css/font-awesome.min.css" rel="stylesheet" />
    <!-- PRETTYPHOTO STYLE CSS -->
    <link href="assets/css/prettyPhoto.css" rel="stylesheet" />
    <!-- CUSTOM STYLE CSS -->
    <link href="assets/css/style.css" rel="stylesheet" />    
    <!-- GOOGLE FONT -->
    <link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css' />

</head>
   
 <body> 
<?php include 'koneksi.php';
$queryS = mysql_query('SELECT * FROM spek_data ORDER BY ts ASC LIMIT 0,20');
if(!$queryS){
	die( mysql_error() );
}$i=1;
	while($rows = mysql_fetch_array($queryS)){
	 $k=$rows['k'];
	 $jd=$rows['jd'];
	 $tr=$rows['tr'];
	 $ts=$rows['ts'];
	echo $ts;
	}
	
			?>	
<center>	
	<!..data training dan testing..>			
 <section class="services"><center>
										
                            
                         
                </div>
            <div class="col-md-4  col-sm-4">
                  <i class="fa fa-comments-o fa-5x"></i>
                            <h4> <strong></strong> </h4>
                            <p>
                                
								
<?php
include "koneksi.php";
//isi data di training1
$sql9 = mysql_query("TRUNCATE TABLE training");	
$queryTR = mysql_query("SELECT * FROM dataset ORDER BY no asc LIMIT 0,$tr");
if(!$queryTR){
	die( mysql_error() );
}$i=1;
while($rowsTR = mysql_fetch_array($queryTR)){
	$no=$rowsTR['no'];
	$yt=$rowsTR['yt'];
	$x1=$rowsTR['x1'];
	$x2=$rowsTR['x2'];
	$x3=$rowsTR['x3'];
	$x4=$rowsTR['x4'];

			
		
$query = "INSERT INTO training(no,op,c1,c2,c3,c4) VALUES('$no','$yt','$x1','$x2','$x3','$x4')";
$data2y = mysql_query($query);
 }
 ?>
 <tr><td colspan="5" bgcolor="#339999"><center><h3></h3></center></td></tr>
 
 <?php
 //data testing
 include"koneksi.php";
$sql9 = mysql_query("TRUNCATE TABLE testing");	
$queryTR = mysql_query("SELECT * FROM dataset ORDER BY no desc LIMIT 0,$ts");
if(!$queryTR){
	die( mysql_error() );
}$i=1;
while($rowsTR = mysql_fetch_array($queryTR)){
	$no=$rowsTR['no'];
	$yt=$rowsTR['yt'];
	$x1=$rowsTR['x1'];
	$x2=$rowsTR['x2'];
	$x3=$rowsTR['x3'];
	$x4=$rowsTR['x4'];
	


$query = "INSERT INTO testing(no,yt,t1,t2,t3,t4) VALUES('$no','$yt','$x1','$x2','$x3','$x4')";
$data4= mysql_query($query);

	} 
	
	 
	
	?>
	
	
	
	<!--hitung nilai k-->
	 
	 

</table>


                        
                            </p>
                </div>
               </div>
            </div>   
           
       </section>       
		
		
		</td></tr></table>


</section>
	
	
    <!--/.NOTE END-->
     <section id="clients"  >
        
                
            <div class="container">
           <div class="row text-center pad-bottom" >
            <div class="col-md-12">
               
			   
			   
			   
			   
			   
            </div>
               
               </div>
        </div>
        </section>
		</body></html>
