andre 4 years ago
parent
commit
ff161908ab
1 changed files with 1 additions and 2 deletions
  1. 1 2
      index.php

+ 1 - 2
index.php

@@ -3,11 +3,10 @@ error_reporting(E_ALL);
 $ip = "192.168.2.23";
 
 $db = new mysqli('localhost', 'ban', 'Blubb123-', 'ban');
-$db->set_charset('utf8');
-
 if ($db->connect_errno){
     die($db->connect_error);
 }
+$db->set_charset('utf8');
 function set($ip,$db) {
     $dbAction = $db->prepare("INSERT INTO list (ip) VALUES (?) ON DUPLICATE KEY UPDATE count = count + 1");
     $dbAction->bind_param('i',$ip);