andre 4 лет назад
Родитель
Сommit
141eff4a8a
1 измененных файлов с 4 добавлено и 2 удалено
  1. 4 2
      index.php

+ 4 - 2
index.php

@@ -12,7 +12,7 @@ function checkToken($token,$db) {
     $dbAction = $db->prepare("SELECT description FROM clients WHERE token = '?'");
     $dbAction->bind_param('s',$token);
     $dbAction->execute();
-    $dbAction->bind_result($token, $description);
+    $dbAction->bind_result($description);
     echo "$description";
     if ($dbAction->num_rows == 1){
         return true;
@@ -30,6 +30,8 @@ if (checkToken($token,$db)){
     if(set(ip2long($ip),$db)){
         echo " inserted $ip" . PHP_EOL;
     } else {
-        echo "fehler" . PHP_EOL;
+        echo " fehler" . PHP_EOL;
     };
+} else {
+    echo "token not exist" . PHP_EOL;
 };