Advertisement
kasyfunnur

proses_edit

Jan 13th, 2015
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. <?php
  2. include 'koneksi.php';
  3.  
  4. $id_berita = $_GET['id'];
  5. $judul = $_POST['judul'];
  6. $headline = $_POST['headline'];
  7. $isi = $_POST['isi'];
  8. $pengirim = $_POST['pengirim'];
  9.  
  10. $edit_berita = "UPDATE berita SET judul='$judul', headline='$headline', isi='$isi', pengirim='$pengirim' WHERE id_berita = '$id_berita'";
  11. $editberita_query = mysql_query($edit_berita) or die(mysql_error());
  12.  
  13. header('Location: arsip_berita.php');
  14.  
  15. if (mysql_query($edit_berita))
  16. {
  17. echo "<h2><font color=blue>berita telah berhasil diedit</font></h2>" ;
  18. }
  19. else
  20. {
  21. echo "<h2><font color=red>berita gagal diedit</font></h2>" ;
  22. }
  23. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement