Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. <?php
  2. ob_start();
  3. session_start();
  4. $username=$_SESSION['username'];
  5. include_once"includes/db_connect.php";
  6. include_once"includes/functions.php";
  7. logincheck();
  8. function random(){
  9. $upper = array('1','2','3','4','5','6','7','8','9');
  10. $lower = array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z');
  11. $numba = array('0','1','2','3','4','5','6','7','8','9');
  12. for($x = 0; $x <= 2; $x++){
  13. $random .= $upper[rand(0, count($lower) - 1)].$lower[rand(0, count($upper) - 1)].$numba[rand(0, count($numba) - 1)];
  14. }
  15. return $random;
  16. }
  17. $coder = random();
  18. if(isset($_POST['code'], $_POST['real'])){
  19. $code = strip_tags($_POST['code']);
  20. $real = strip_tags($_POST['real']);
  21. if($code != $real){
  22. echo 'Code does not match.';
  23. } else {
  24. mysql_query("UPDATE `users` SET status='Dead' WHERE `username`='".$_SESSION['username']."'");
  25. session_destroy();
  26. header('Location: /');
  27. exit;
  28. }
  29. }
  30. ?>
  31. <form action="" method="post">
  32. <input type="text" disabled="disabled" value="<?php echo $coder; ?>" />
  33. <input type="hidden" name="real" value="<?php echo $coder; ?>" /><br />
  34. Enter the code you see above:<br />
  35. <input type="text" name="code" /><br />
  36. <input type="submit" value="Suicide" />
  37. </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement