get_ip(); /* |------------------------------------------------------------- | Login |------------------------------------------------------------- | This is annoying because I want to keep the website secure | but I have no clue how to keep things secure with HTML, PHP | or JS. So I hope seperating the scripts and putting all this | into a PHP file is a good secutiry mesure |------------------------------------------------------------- */ if (isset($_POST['submit_login'])) { $error = 0; $ban_query = mysqli_query($conn, "SELECT * FROM bans WHERE ipaddress = '$user_ip' ORDER BY id DESC LIMIT 1"); while ($ban_check = mysqli_fetch_assoc($ban_query)) { $ban_time = $ban_check['time']; $ban_perm = $ban_check['permanent']; } $ban_diff = time() - strtotime($ban_time); if ($ban_perm) { ?> = 5) { mysqli_query($conn,"INSERT INTO bans (ipaddress, reason, length, permanent) VALUES('$user_ip','Attempted password too many times', '60', '0')"); } } if ($error <= 0) { // Checking if Username is empty if (empty(trim($_POST["username"]))) { ?> = 5) { mysqli_query($conn,"INSERT INTO bans (ipaddress, reason, length, permanent) VALUES('$user_ip','Attempted password too many times', '60', '0')"); } } if ($error <= 0) { if (empty(trim($_POST["username"]))) { // Username not entered ?>