Advertisement
Guest User

Untitled

a guest
Jan 21st, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. <?php
  2.  
  3. session_start();
  4.  
  5. $username = $_POST['username'];
  6. $password = $_POST['password'];
  7.  
  8. if ($username&&$password)
  9. {
  10.  
  11. $connect = mysql_connect("192.168.1.19","root","xxx") or die ("Couldnt connect to MySQL database. Please contact Ocela at dylplum2002@gmail.com");
  12. mysql_select_db("proxy") or die ("Couldn't find database. Please contact Ocela at dylplum2002@gmail.com");
  13.  
  14. $query = mysql_query("SELECT * FROM users WHERE username='$username'");
  15.  
  16. $numrows = mysql_num_rows($query);
  17.  
  18. if($numrows !=0)
  19.  
  20. {
  21.  
  22. while ($row = mysql_fetch_assoc($query))
  23. {
  24.  
  25. $dbusername = $row['username'];
  26. $dbpassword = $row['password'];
  27.  
  28. {
  29. if ($username==$dbusername&&$password==$dbpassword)
  30. {
  31.  
  32. echo "Login succesful. <a href='/proxy/index.php'>Click here to enter the Premium Proxy.</a>";
  33. $_SESSION['username']=$dbusername;
  34.  
  35. }
  36. else
  37. echo "Incorrect password.";
  38. }
  39.  
  40. else
  41. die "That login doesnt exist. To get an account please contact Dylan.";
  42.  
  43.  
  44. }
  45. else
  46. die ("Please enter a username and password.");
  47.  
  48. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement