🚀 Hostinger Optimized
🖥️ Server: LiteSpeed
💻 System: Linux in-mum-web1643.main-hosting.eu 5.14.0-687.46.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Sep 11 09:03:19 EDT 2026 x86_64
👤 User: u621169360 (621169360)
🐘 PHP: 8.2.33
🚫 Disabled: system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail

💻 Terminal

📁 /home/u621169360/domains/agriexpertt.com/public_html
$

📄 contact_process.php

📁 Path: /home/u621169360/domains/papayawhip-cod-251399.hostingersite.com/public_html/contact_process.php
📊 Size: 1.26 KB
🔒 Perm: 0644
📝 MIME: text/x-php
<?php
require_once __DIR__ . '/inc/secure.php'; // Security bootstrap
require_once __DIR__ . '/admin-panal/includes/db.php';

if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    $name    = trim($_POST['name'] ?? '');
    $email   = trim($_POST['email'] ?? '');
    $message = trim($_POST['message'] ?? '');

    if (empty($name) || empty($email) || empty($message)) {
        $_SESSION['flash'] = ['type' => 'danger', 'msg' => 'Please fill all required fields.'];
    } elseif (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
        $_SESSION['flash'] = ['type' => 'danger', 'msg' => 'Please enter a valid email address.'];
    } else {
        try {
            $stmt = $pdo->prepare("INSERT INTO contact_messages (name, email, message) VALUES (?, ?, ?)");
            if ($stmt->execute([$name, $email, $message])) {
                $_SESSION['flash'] = ['type' => 'success', 'msg' => 'Thank you for your message. We will get back to you soon!'];
            } else {
                $_SESSION['flash'] = ['type' => 'danger', 'msg' => 'Something went wrong. Please try again.'];
            }
        } catch (PDOException $e) {
            $_SESSION['flash'] = ['type' => 'danger', 'msg' => 'Database error: ' . $e->getMessage()];
        }
    }
}

header("Location: contact-us.php");
exit;
← Back📥 Raw✏️ Edit🔒 Chmod
✨ File Manager Magic ✨