Init Commit
This commit is contained in:
19
fetch_config.php
Normal file
19
fetch_config.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
include 'connectDB.php';
|
||||
|
||||
$cvId = $_GET['cvId'];
|
||||
$tableName = $_GET['tableName'];
|
||||
|
||||
$sql = "SELECT `$tableName` FROM `config` WHERE `owner` = $cvId";
|
||||
|
||||
$result = $conn->query($sql);
|
||||
|
||||
if ($result->num_rows > 0) {
|
||||
$row = $result->fetch_assoc();
|
||||
echo json_encode($row[$tableName]);
|
||||
} else {
|
||||
echo json_encode(null);
|
||||
}
|
||||
|
||||
$conn->close();
|
||||
?>
|
||||
Reference in New Issue
Block a user