|
@@ -10,11 +10,10 @@ $db->set_charset('utf8');
|
|
|
|
|
|
|
|
function checkToken($token,$db) {
|
|
function checkToken($token,$db) {
|
|
|
echo "got token: $token" . PHP_EOL;
|
|
echo "got token: $token" . PHP_EOL;
|
|
|
- $dbAction = $db->prepare("SELECT description FROM clients WHERE token='123456a'");
|
|
|
|
|
-// $dbAction->bind_param('s',$token);
|
|
|
|
|
|
|
+ $dbAction = $db->prepare("SELECT description FROM clients WHERE token = ?");
|
|
|
|
|
+ $dbAction->bind_param('s',$token);
|
|
|
$dbAction->execute();
|
|
$dbAction->execute();
|
|
|
$dbAction->bind_result($description);
|
|
$dbAction->bind_result($description);
|
|
|
- print_r($dbAction);
|
|
|
|
|
echo "$description blubb $dbAction->num_rows" . PHP_EOL;
|
|
echo "$description blubb $dbAction->num_rows" . PHP_EOL;
|
|
|
if ($dbAction->num_rows == 1){
|
|
if ($dbAction->num_rows == 1){
|
|
|
return true;
|
|
return true;
|