Server : Apache System : Linux server1.cgrithy.com 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64 User : nobody ( 99) PHP Version : 8.1.23 Disable Function : NONE Directory : /home/dnlcambodia/public_html/dnl_dashboard/Feature/Process/ |
<?php // Assuming you have a database connection $conn include '../PHP/config/db_conn.php'; // Assuming you have a database connection $conn if ($_SERVER["REQUEST_METHOD"] == "POST") { $name = $_POST['name']; $title = $_POST['title']; $description = $_POST['description']; $content = $_POST['content']; $feature_id = $_POST['feature_id']; $sql = "INSERT INTO function (name, title, description, content, feature_id) VALUES ('$name', '$title', '$description', '$content', $feature_id)"; if ($conn->query($sql) === TRUE) { echo "New record created successfully"; } else { echo "Error: " . $sql . "<br>" . $conn->error; } } $conn->close(); ?>