Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if (!isset($_POST['submit'])){
- ?>
- <?php
- require_once("../system/db.php");
- $mysqli = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);
- if ($mysqli->connect_errno) {
- echo "<p>MySQL error no {$mysqli->connect_errno} : {$mysqli->connect_error}</p>";
- exit();
- }
- $username = $_POST['username'];
- $password = $_POST['password'];
- $sql = "SELECT * from users WHERE username LIKE '{$username}' AND password LIKE '{$password}' LIMIT 1";
- $result = $mysqli->query($sql);
- if (!$result->num_rows == 1) {
- echo "<p>Invalid username/password combination</p>";
- } else {
- header('Location: http://acjbox.rf.gd/memberarea');
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement