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

+ 2 - 2
index.php

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