<img src="img/ajax-loader1.gif" style="position:fixed; margin:0px auto; margin-left:50%; margin-top:50%" width="100">
<?php
//DATA PEMESANAN					
			$localhost = "156.67.220.146";
			$username = "admin_etiket";
			$password = "3t1k3tj00s";
			$database = "admin_etiket";
			$test = mysql_connect("$localhost","$username","$password");
			$db = mysql_select_db($database,$test);

			$sql="select id_pemesanan,id_member,tanggal_trx,status from tb_pemesanan";
			$hasil = mysql_query($sql) or die("Kesalahan Pada SQL");
					mysql_close($test);
					while($row = mysql_fetch_object($hasil)){
						$id_pemesanan = $row->id_pemesanan;
						$id_member = $row->id_member;
						$tanggal_trx = $row->tanggal_trx;
						$status = $row->status;

						include("config/connection.php");
						$sql3 ="select id_pemesanan from tb_pemesanan where id_pemesanan = '".$id_pemesanan."'";
						$hasil3 = mysql_query($sql3) or die("Kesalahan Pada SQL");
						$jumlah3 = mysql_num_rows($hasil3);

						if ($jumlah3 < 1){
							include("config/connection.php");
							$sql2="insert into tb_pemesanan(id_pemesanan,id_member,tanggal_trx,status) values ('".$id_pemesanan."', '".$id_member."', '".$tanggal_trx."', '".$status."')";
							
							if (!mysql_query($sql2,$test)){
							die('Error: ' . mysql_error());
							}
						}
					}
					
?>
<script>window.location = "<?php echo $base?>singkong2"</script>
