<?php
mysql_connect("localhost", "root", "");
mysql_select_db("mansapas");
include("sess_check.php");
error_reporting(0);

$id_tmp_spp = $_POST['id_tmp_spp'];
$id = $sess_kasirid;
$jumspp = $_POST['jumspp'];
$stt = "On Process";
$tg = $_POST['tgl'];
$id_trx = $_POST['id_trx'];

for ($i = 1; $i <= $jumspp; $i++) {
	$bulan = $_POST['bulan' . $i];
	if (!empty($bulan)) {
		$query = "INSERT INTO tmp_spp VALUES('$id_tmp_spp','$bulan','$stt','$id','$id_trx')";
		mysql_query($query);
	}
}

echo "<script type='text/javascript'> document.location = 'trx_pembayaran.php'; </script>";
