SHARE
TWEET

proses_data

isnan_ha18 Jan 23rd, 2020 570 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.     require_once ('configuration.php');
  3.  
  4.     if($_GET['id'] == "0"){
  5.         $string = "INSERT INTO `tbl_provinsi`(`cl_id`, `cl_provinsi`, `cl_kode`, `cl_kota`, `cl_gubernur`) VALUES ('','$_GET[data_2]','$_GET[data_1]','$_GET[data_3]','$_GET[data_4]')";
  6.         $query = mysqli_query($connection,$string);
  7.         if($query){
  8.             echo "sukses";
  9.         }else{
  10.             echo "gagal";
  11.         }
  12.     }else{
  13.         $string = "UPDATE `tbl_provinsi` SET `cl_provinsi`='$_GET[data_2]',`cl_kode`='$_GET[data_1]',`cl_kota`='$_GET[data_3]',`cl_gubernur`='$_GET[data_4]' WHERE `cl_id`='$_GET[id]'";
  14.         $query = mysqli_query($connection,$string);
  15.         if($query){
  16.             echo "sukses";
  17.         }else{
  18.             echo "gagal";
  19.         }
  20.     }
  21. ?>
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
Top