Advertisement
nauvals78

CRUD OOP - aksi

Aug 17th, 2017
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.51 KB | None | 0 0
  1. <?php
  2. //memasukan file core
  3. include "core.php";
  4. //instanisasi class core
  5. $core = new core();
  6.  
  7. $aksi = $_GET["aksi"];
  8. if($aksi == 'create'){
  9.     $core->create($_POST['nim'],$_POST['nama']);
  10.     header("location:index.php?success");
  11. }else if($aksi == 'delete'){
  12.     $id_delete = $_GET['id'];
  13.     $core->delete($id_delete);
  14.     header("location:index.php?success");
  15. }else if($aksi == 'update'){
  16.     $id_update = $_POST['id'];
  17.     $core->update($id_update,$_POST['nama'],$_POST['nim']);
  18.     header("location:index.php?success");
  19. }
  20.  ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement