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