Update add_client.php
This commit is contained in:
@@ -88,9 +88,14 @@ include "../../../config.php";
|
|||||||
|
|
||||||
// Convert the random bytes to hexadecimal
|
// Convert the random bytes to hexadecimal
|
||||||
$apikey = bin2hex($random_bytes);
|
$apikey = bin2hex($random_bytes);
|
||||||
echo($cert);
|
$stmt = $conn->prepare("INSERT INTO secrets (machine_id, cert) VALUES (?, ?)");
|
||||||
echo("<br>");
|
$stmt->bind_param("ss", $machineid, $cert);
|
||||||
echo($apikey);
|
$stmt->execute();
|
||||||
|
$stmt->close();
|
||||||
|
$stmt = $conn->prepare("INSERT INTO api (machine_id, apikey) VALUES (?, ?)");
|
||||||
|
$stmt->bind_param("ss", $machineid, $apikey);
|
||||||
|
$stmt->execute();
|
||||||
|
$stmt->close();
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user