andre 4 éve
szülő
commit
9f69489668
1 módosított fájl, 2 hozzáadás és 2 törlés
  1. 2 2
      index.php

+ 2 - 2
index.php

@@ -9,8 +9,8 @@ if ($db->connect_errno){
     die('Sorry - gerade gibt es ein Problem');
     die('Sorry - gerade gibt es ein Problem');
 }
 }
 function set($ip,$db) {
 function set($ip,$db) {
-    $dbAction = $db->prepare("INSERT INTO list (ip) VALUES (INET_ATON(?)) ON DUPLICATE KEY UPDATE count = count + 1");
-    $dbAction->bind_param('i',$ip);
+    $dbAction = $db->prepare("INSERT INTO list (ip) VALUES (?) ON DUPLICATE KEY UPDATE count = count + 1");
+    $dbAction->bind_param('i',ip2long($ip));
     return $dbAction->execute();
     return $dbAction->execute();
 }
 }
 if(set($ip,$db)){
 if(set($ip,$db)){