OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
3-31-025chanakya
/
interface
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
03/31/2025 06:36:42 AM
rwxr-xr-x
📄
back_upload.php
5.13 KB
03/26/2025 03:48:05 AM
rw-r--r--
📄
index.html
2.29 KB
03/26/2025 03:48:05 AM
rw-r--r--
📄
index.php
1.47 KB
03/26/2025 03:48:05 AM
rw-r--r--
📄
upload.php
9.28 KB
03/26/2025 03:48:05 AM
rw-r--r--
Editing: index.php
Close
<?php $host = '139.59.38.164'; $username = 'root'; $password = 'newstart'; $database = 'gallery'; $conn = new mysqli($host, $username, $password, $database); if ($conn->connect_error) { die("Connection failed: " . $mysqli->connect_error); } $conn->set_charset('utf8mb4'); if (!isset($conn) || $conn->connect_error) { die("Database connection failed: " . $conn->connect_error); } $message = ""; if ($_SERVER["REQUEST_METHOD"] == "POST") { $category = htmlspecialchars(trim($_POST['category'])); $template_name = htmlspecialchars(trim($_POST['template_name'])); $image_path = !empty($_POST['image_path']) ? htmlspecialchars(trim($_POST['image_path'])) : NULL; $template_path = !empty($_POST['template_path']) ? htmlspecialchars(trim($_POST['template_path'])) : NULL; $stmt = $conn->prepare("INSERT INTO newsletters (Category, template_name, image_path, template_path) VALUES (?, ?, ?, ?)"); if ($stmt === false) { die("Error preparing statement: " . $conn->error); } $stmt->bind_param("ssss", $category, $template_name, $image_path, $template_path); if ($stmt->execute()) { $message = "New record inserted successfully!"; } else { error_log("MySQL Error: " . $stmt->error); $message = "Error: " . $stmt->error; } $stmt->close(); } $conn->close(); echo "<script> alert('$message'); window.location.href = 'index.html'; </script>"; exit();