123456789101112131415161718192021222324 |
- <?php
- require_once("../../php/db_utils.php");
-
- try {
- // Connect to the database
- $database = db_connect();
-
- // Incoming data
- $ideaId = $_POST["idea_id"];
-
- // Declare query
- $query = 'DELETE FROM comments WHERE idea_id = "' . $ideaId . '";';
-
- // 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);
- }
- ?>
|