1234567891011121314151617181920212223242526 |
- <?php
- require_once("../../php/db_utils.php");
-
- try {
- // Connect to the database
- $database = db_connect();
-
- // Incoming data
- $canvasId = $_POST["canvas_id"];
- $projectTitle = $_POST["project_title"];
- $projectDate = $_POST["current_date"];
-
- // Update project title
- $query = 'UPDATE canvas SET canvas_name="' . $projectTitle . '", canvas_date="' . $projectDate . '" WHERE canvas_id="' . $canvasId . '";';
-
- // Update old project title
- db_query_no_return($database, $query);
-
- // Close the connection to the database
- db_close($database);
- }
- catch(Exception $e) {
- $errorMsg = $e->getMessage();
- print_r($errorMsg);
- }
- ?>
|