<?php
if(isset($_POST['btnSiswa'])){
$jumlah = count($_POST['s_nama']);
echo "<h1>Informasi</h1>";
for($i=0; $i<$jumlah; $i++){
$urut = $i+1;
//$nim = $_POST['nim'][$i];
$s1 = $_POST['s_nama'][$i];
$conid1 = $_POST['conid'];
$confoto1 = $_POST['confoto'];
$regpdm1 = $_POST['s_regpkr'];
$regtah1 = $_POST['s_regtah'][$i];
$regbb1 = $_POST['s_regbb'];
$mytable1 = $_POST['table'];
$identitas1 = "{$s1}|{$_POST[s_tlhr][$i]}|{$_POST[s_umur][$i]}|{$_POST[s_tgllhr][$i]}|{$_POST[s_sex][$i]}|{$_POST[s_kbgs][$i]}|{$_POST[s_umur][$i]}|{$_POST[s_alamat][$i]}|{$_POST[s_agama][$i]}|{$_POST[s_kerja][$i]}|{$_POST[s_sekolah][$i]}";
mysql_connect("localhost", "root", "benk");
mysql_select_db("cma");
$query2 = "UPDATE $mytable1 Set berkas_digrec = '1' where uid = '$conid1'";  
$result2 = mysql_query($query2); 

mysql_connect("localhost", "root", "benk");
mysql_select_db("cma_tahap2");
$query = "insert into pidum (t_idcon,t_identitasterdakwa,t_regperkara,t_regtah,t_regbb,t_foto)values('$conid1','$identitas1','$regpdm1','$regtah1','$regbb1','$confoto1')";
mysql_query($query);
//------------------------------------------

?>
<LINK href="../images/index.css" rel="stylesheet" type="text/css">
<table width="100%"  border="0" cellspacing="1" cellpadding="1">
  <tr>
    <td height="20">&nbsp;</td>
  </tr>
</table>
<table width="80%"  border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td bgcolor="#000000"><table width="100%"  border="0" cellspacing="4" cellpadding="4">
        <tr>
          <td bgcolor="#FFFFFF"><table width="100%"  border="0" cellspacing="2" cellpadding="2">
            <tr>
              <td height="20"><strong>BERHASIL DI INPUT REKAM DIGITAL SEBAGAI BERIKUT </strong></td>
            </tr>
            <tr>
              <td height="20">&nbsp;</td>
            </tr>
            <tr>
              <td height="20"><?PHP echo $urut.". ".$s1." Tahanan ".$identitas1.""; ?>
 </td>
            </tr>
            <tr>
              <td height="20">&nbsp;</td>
            </tr>
          </table></td>
        </tr>
      </table></td>
    </tr>
</table>
  <table width="100%"  border="0" cellspacing="1" cellpadding="1">
    <tr>
      <td height="20">&nbsp;</td>
    </tr>
  </table>
  </div>

<? }} ?><table width="80%"  border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td bgcolor="#FFFFFF"><table width="100%"  border="0" cellspacing="1" cellpadding="0">
            <tr>
              <td><a href="../index.php?g=tahap2&i=index" class="menu">KEMBALI KE HALAMAN BERANDA</a></td>
            </tr>
          </table></td>
        </tr>
      </table>
<table width="100%"  border="0" cellspacing="1" cellpadding="1">
  <tr>
    <td height="20">&nbsp;</td>
  </tr>
  <tr>
    <td height="20">&nbsp;</td>
  </tr>
</table>
