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

+ 2 - 2
index.php

@@ -9,17 +9,17 @@ if ($db->connect_errno){
 $db->set_charset('utf8');
 
 function checkToken($token,$db) {
-    echo "got token: $token" . PHP_EOL;
     $dbAction = $db->prepare("SELECT description FROM clients WHERE token = ?");
     $dbAction->bind_param('s',$token);
     $dbAction->execute();
     $dbAction->store_result();
     $dbAction->bind_result($desc);
     $dbAction->fetch();
-    echo "found $desc" . PHP_EOL;
     if ($dbAction->num_rows() == 1){
+        echo "Client $desc";
         return true;
     }
+    echo "Client $token not registered";
     return false;
 }