Advertisement
Guest User

Untitled

a guest
Oct 5th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. <?php
  2.  
  3. session_start();
  4.  
  5. session_destroy();
  6.  
  7. $ajhgsfdgg = $_POST['uni'];
  8. $piokmihuyg = $_POST['pwi'];
  9.  
  10. mysql_connect("127.0.0.1", "root", "*ADMINPASS*") or die(mysql_error());
  11. mysql_select_db("*DB*") or die(mysql_error());
  12.  
  13. $asdgasugsoioajwd = mysql_query("SELECT * FROM *USERTABLE*") or die(mysql_error());
  14.  
  15. if(!isset($_SESSION['user'])){
  16.  
  17. if(!isset($ajhgsfdgg)){
  18. echo "Welcome to *Your website name here*.<br>";
  19. echo "Please login:<br>";
  20. echo "<form method=POST>";
  21. echo "Username: <input type=text name=uni><br>";
  22. echo "Password: <input type=pass name=pwi><br>";
  23. echo "<input type=submit value=Login>";
  24. echo "</form>";
  25. exit;
  26. }
  27.  
  28. while($row = mysql_fetch_array($asdgasugsoioajwd)){
  29. $piokmihuyg = md5($piokmihuyg);
  30. if($piokmihuyg == $row['password'] && $ajhgsfdgg == $row['username']){
  31. $_SESSION['user'] = $ajhgsfdgg;
  32. echo "<Meta http-equiv=Refresh content='0'>";
  33. }
  34. }
  35.  
  36. echo "<Meta http-equiv=Refresh content='0'>";
  37. exit;
  38.  
  39. }
  40.  
  41. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement