Guest User

action ganti password

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