1234567891011121314151617181920212223242526272829 |
- <?php
- require_once("../../php/db_utils.php");
-
- try {
- // Connect to the database
- $database = db_connect();
-
- // Incoming data
- $canvasId = $_POST["canvas_id"];
-
- // Check if the tag already exists
- $query = 'SELECT canvas_public FROM canvas WHERE canvas_id = "' . $canvasId . '";';
-
- $recordSet = db_query_return($database, $query);
-
- $record = mysqli_fetch_assoc($recordSet);
- $public = $record["canvas_public"];
- mysqli_free_result($recordSet);
-
- echo($public);
-
- // Close the connection to the database
- db_close($database);
- }
- catch(Exception $e) {
- $errorMsg = $e->getMessage();
- print_r($errorMsg);
- }
- ?>
|