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

+ 2 - 1
index.php

@@ -9,6 +9,7 @@ if ($db->connect_errno){
 $db->set_charset('utf8');
 
 function checkToken($token,$db) {
+    echo "got token: $token";
     $dbAction = $db->prepare("SELECT description FROM clients WHERE token = '?'");
     $dbAction->bind_param('s',$token);
     $dbAction->execute();
@@ -26,7 +27,7 @@ function set($ip,$db) {
     return $dbAction->execute();
 }
 
-if (!checkToken($token,$db)){
+if (checkToken($token,$db)){
     if(set(ip2long($ip),$db)){
         echo " inserted $ip" . PHP_EOL;
     } else {