Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. <?php
  2. if (!isset($_POST['submit'])){
  3. ?>
  4. <?php
  5. require_once("../system/db.php");
  6. $mysqli = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);
  7. if ($mysqli->connect_errno) {
  8. echo "<p>MySQL error no {$mysqli->connect_errno} : {$mysqli->connect_error}</p>";
  9. exit();
  10. }
  11. $username = $_POST['username'];
  12. $password = $_POST['password'];
  13.  
  14. $sql = "SELECT * from users WHERE username LIKE '{$username}' AND password LIKE '{$password}' LIMIT 1";
  15. $result = $mysqli->query($sql);
  16. if (!$result->num_rows == 1) {
  17. echo "<p>Invalid username/password combination</p>";
  18. } else {
  19. header('Location: http://acjbox.rf.gd/memberarea');
  20. }
  21. }
  22. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement