File manager - Edit - /home/custbahd/mediagepr.com/admin/comments/edit.php
Back
<?php session_start(); include_once('db/connection.php'); if(isset($_POST['edit'])){ $id = $_POST['id']; $name = $_POST['name']; $email = $_POST['email']; $comments = $_POST['comments']; $rating = $_POST['rating']; $image = $_POST['image']; $sql = "UPDATE comments SET name = '$name', email = '$email', comments = '$comments', rating = '$rating', image = '$image' WHERE id = '$id'"; //use for MySQLi OOP if($conn->query($sql)){ $_SESSION['success'] = 'Comment updated successfully'; } /////////////// //use for MySQLi Procedural // if(mysqli_query($conn, $sql)){ // $_SESSION['success'] = 'Member updated successfully'; // } /////////////// else{ $_SESSION['error'] = 'Something went wrong in updating brand'; } } else{ $_SESSION['error'] = 'Select brand to edit first'; } header('location: index.php'); ?>
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Generation time: 1.16 |
proxy
|
phpinfo
|
Settings