1234567891011121314151617181920212223242526 |
- <?php
- require_once("../../php/db_utils.php");
-
- try {
- // Connect to the database
- $database = db_connect();
-
- // Incoming data
- $typingId = $_POST["typing_id"];
- $canvasId = $_POST["canvas_id"];
- $username = $_POST["username"];
-
- // Update the typing ID
- $query = 'UPDATE collaborators SET typing_id="' . $typingId . '" WHERE canvas_id="' . $canvasId . '" AND collaborator="' . $username . '";';
-
- // Insert new or update old description
- db_query_no_return($database, $query);
-
- // Close the connection to the database
- db_close($database);
- }
- catch(Exception $e) {
- $errorMsg = $e->getMessage();
- print_r($errorMsg);
- }
- ?>
|