Advertisement
ujiajah1

Backup_update.php

Jan 5th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.68 KB | None | 0 0
  1. <?
  2. if(isset($_REQUEST['edit'])){
  3. include('../db/config.php');
  4. $ip=$_SERVER['REMOTE_ADDR'];
  5. $tgl=date('d/m/y H:i:s');
  6. $nama=$_REQUEST['nama'];
  7. $email=$_REQUEST['email'];
  8. $tujuan=$_REQUEST['no_tujuan'];
  9. $pesan=$_REQUEST['pesan'];
  10.  
  11. $update=mysql_query("update ujian set ip = '$ip', tgl = '$tgl', nama = '$nama', email = '$email', no_tujuan = '$tujuan', pesan = '$pesan' where id_pesan = '$_REQUEST[id_pesan]'");
  12. if($update):
  13. ?>
  14. <script language="javascript">
  15. alert('data pesan anda berhasil kami update dari database kami');
  16. document.location="../";
  17. </script>
  18. <?end;else:?>
  19. <script>
  20. alert('gagal mengupdate pesan anda periksa masukan');
  21. window.back();
  22. </script>
  23. <?endif;}?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement