Init Commit
This commit is contained in:
22
check_auth.php
Normal file
22
check_auth.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
include 'connectDB.php';
|
||||
|
||||
$cvId = $_GET['cvId'];
|
||||
|
||||
$sql = "SELECT visible, accessKey FROM `profile` WHERE `cid` = ?";
|
||||
$stmt = $conn->prepare($sql);
|
||||
$stmt->bind_param("i", $cvId);
|
||||
$stmt->execute();
|
||||
$result = $stmt->get_result();
|
||||
|
||||
if ($result->num_rows > 0) {
|
||||
$row = $result->fetch_assoc();
|
||||
echo json_encode($row);
|
||||
}
|
||||
else {
|
||||
echo json_encode(null);
|
||||
}
|
||||
|
||||
$stmt->close();
|
||||
$conn->close();
|
||||
?>
|
||||
Reference in New Issue
Block a user