Ver Fonte

db test

andre há 4 anos atrás
pai
commit
09b339978e
1 ficheiros alterados com 2 adições e 3 exclusões
  1. 2 3
      index.php

+ 2 - 3
index.php

@@ -15,7 +15,7 @@ function checkToken($token,$db) {
     $dbAction->bind_result($token, $description);
     echo "$description" . PHP_EOL;
     if ($dbAction->num_rows == 1){
-        return true;
+        return "blubb";
     }
     return false;
 }
@@ -25,8 +25,7 @@ function set($ip,$db) {
     $dbAction->bind_param('i',$ip);
     return $dbAction->execute();
 }
-$client = checkToken($token,$db);
-if ($client){
+if (checkToken($token,$db)){
     if(set(ip2long($ip),$db)){
         echo "$token inserted $ip" . PHP_EOL;
     } else {