Advertisement
joyfriend

99-06

Nov 19th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. <html>
  2. <body>
  3.  
  4. <?php
  5. $id = $_GET["id"];
  6. $sand = $_GET["sand"];
  7.  
  8. if($id!= NULL && $sand!=NULL)
  9. {
  10. require_once("my_DB_functions.php");
  11. $conn = My_Connect_DB();
  12.  
  13. if(!$conn)
  14. die("Connection to DB failed: ".mysqli_connect_error());
  15.  
  16. $sql = "SELECT * FROM Employee WHERE id='".$id."';";
  17. $result = My_SQL_EXE($conn, $sql);
  18.  
  19. if($row = mysqli_fetch_row($result))
  20. {
  21. if($sand == md5($row[1]))
  22. {
  23. echo "<form method='post' action='Activity-99-07.php'>";
  24. echo "Your ID is: ".$row[0]."<br>";
  25. echo "<input type=hidden name=id value='".$id."'>";
  26. echo "<input type=hidden name=sand value='".$sand."'>";
  27. echo "Your new password: <input type=password name=newpasswd><br>";
  28. echo "Your new password again: <input type=password name=newpasswd2><br>";
  29. echo "<input type=submit name=submit><br>";
  30. echo "</form>";
  31. }
  32. else
  33. echo "Wrong sand provided<br>";
  34. }
  35. else
  36. echo "Wrong ID<br>";
  37. }
  38. ?>
  39.  
  40. </body>
  41. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement