Advertisement
Guest User

proses_forgot.php

a guest
Jul 2nd, 2015
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. <?php
  2. set_time_limit (9999999999);
  3. include "../connection.php";
  4. $email = $_REQUEST['email'];
  5.  
  6. echo $email;
  7.  
  8. if ($email!=NULL)
  9.  
  10. {
  11.  
  12. $tgl = date("ymdhis");
  13. $acak = (rand(1000,9999));
  14. $gabung = $tgl.$acak;
  15.  
  16. $query= "UPDATE tbl_user set forgot_unique='".$gabung."' WHERE email='".$email."'";
  17. pg_exec($query);
  18.  
  19.  
  20. require_once("mail/commonFunction.php");
  21.  
  22. if(Send_Mail_to_Destination($email))
  23. {
  24.  
  25. echo "OK";
  26. }
  27. else
  28. {
  29. echo "NOK2";
  30. }
  31. }
  32. else
  33. {
  34. echo "<script language='JavaScript'>window.history.back() </script>";
  35. }
  36.  
  37. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement