File manager - Edit - /home/custbahd/mediagepr.com/admin/comments/delete.php
Back
<?php session_start(); include_once('db/connection.php'); if(isset($_GET['id'])){ $sql = "DELETE FROM comments WHERE id = '".$_GET['id']."'"; //use for MySQLi OOP if($conn->query($sql)){ $_SESSION['success'] = 'Comment deleted successfully'; } //////////////// //use for MySQLi Procedural // if(mysqli_query($conn, $sql)){ // $_SESSION['success'] = 'Member deleted successfully'; // } ///////////////// else{ $_SESSION['error'] = 'Something went wrong in deleting the comment'; } } else{ $_SESSION['error'] = 'Select a comment to delete first'; } header('location: index.php'); ?>
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Generation time: 1 |
proxy
|
phpinfo
|
Settings