12345678910111213141516171819202122232425 |
- <?php
- require_once("../../php/db_utils.php");
-
- try {
- // Connect to the database
- $database = db_connect();
-
- // Incoming data
- $canvasId = $_POST["canvas_id"];
- $collaborator = $_POST["collaborator"];
-
- // Declare query
- $query = 'DELETE FROM collaborators WHERE canvas_id = "' . $canvasId . '" AND collaborator = "' . $collaborator . '";';
-
- // Run query
- db_query_no_return($database, $query);
-
- // Close the connection to the database
- db_close($database);
- }
- catch(Exception $e) {
- $errorMsg = $e->getMessage();
- print_r($errorMsg);
- }
- ?>
|