Guest User

Untitled

a guest
Mar 27th, 2017
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.70 KB | None | 0 0
  1. <?php
  2.  
  3. if(isset($_GET['email']) AND isset($_GET['pin'])){
  4.  
  5.  $email=$_GET['email'];
  6.  $pin=$_GET['pin'];
  7.  
  8. $search = mysql_query("SELECT email, aktifasi, status FROM usastb WHERE email='".$email."' AND aktifasi='".$pin."'") or die(mysql_error());
  9. $match  = mysql_num_rows($search);
  10.  
  11. if($match > 0){
  12.  
  13.     // We have a match, activate the account
  14.  
  15. mysql_query("UPDATE usastb SET status='aktif' WHERE email='".$email."' AND aktifasi='".$pin."' AND status='pending'") or die(mysql_error());
  16.  
  17. echo '<div class="statusmsg">Your account has been activated, you can now login</div>';
  18.  
  19.  
  20. }else{
  21.  
  22.     // No match -> invalid url or account has already been activated.
  23.  
  24. }
  25.  
  26.  
  27.  
  28.  
  29. }
  30.  
  31.  
  32.  
  33. ?>
Add Comment
Please, Sign In to add comment