Advertisement
Guest User

aksi

a guest
Oct 30th, 2016
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. <?php
  2. include 'config.php';
  3.  
  4. $user=$_POST['user'];
  5. $lama=$_POST['lama'];
  6. $baru=$_POST['baru'];
  7. $ulang=$_POST['ulang'];
  8.  
  9. $cek=mysql_query("select * from tb_pengawas where password='$lama' and username='$user'");
  10. if(mysql_num_rows($cek)==1){
  11. if($baru==$ulang){
  12. $b = $baru;
  13. $edit="update tb_pengawas set password='$b' where username='$user'";
  14. mysql_query($edit);
  15. header("location:ganti_pass.php?pesan=oke");
  16. }else{
  17. header("location:ganti_pass.php?pesan=tdksama");
  18. }
  19. }else{
  20. header("location:ganti_pass.php?pesan=gagal");
  21. }
  22.  
  23. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement