SHARE
TWEET

Untitled

oodz May 22nd, 2018 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.   $konek = include "konek.php";
  3.  
  4.   $addnopjk = 0;
  5.                        
  6.     foreach($_POST['status'] as $i => $value)
  7.         {
  8.             $kode        =  $_POST["status"][$i];
  9.             $id_temp     =  $_POST["id_tempnm"][$i];
  10.             $masapjk     =  $_POST["bulan"][$i].'-'.$_POST["tahun"][$i];
  11.             $id_tempx    =  "";
  12.             $tes         =  "select nopjk from pembayaran order by nopjk desc limit 1";
  13.             $dtbs        =  mysql_query($tes) or die("Query gagal");
  14.            
  15.             while($hsldtbs = mysql_fetch_array($dtbs))
  16.                     {  $no_pjk      = $hsldtbs["nopjk"]; }
  17.  
  18.             if($id_tempx != $id_temp)
  19.                 { $addnopjk = $no_pjk + 1; }
  20.             else
  21.                 { $addnopjk = $no_pjk + 0; }           
  22.            
  23. $sql     =  "update pembayaran set status_setorpjk = 'Telah di Setor', masapjk = '$masapjk', nopjk = '$addnopjk' WHERE id_pem ='$kode'";
  24.             $q       = mysql_query($sql) or die (mysql_error());
  25.         }
  26.     if ($q)
  27.         {
  28.            
  29.         }
  30.     else
  31.         {
  32.             mysql_query($sql) or die (mysql_error());
  33.             echo "Data Gagal Disimpan";
  34.         }
  35.  
  36.  ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top