HEX
Server: Apache
System: Linux p3plmcpnl494318.prod.phx3.secureserver.net 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: halcosmu (4392252)
PHP: 8.4.18
Disabled: NONE
Upload Files
File: /home/halcosmu/public_html/heritusalgorix.com/investment/contact.php
<?php
header('Content-Type: application/json');

if ($_SERVER['REQUEST_METHOD'] === 'POST') {

    $name            = trim($_POST['name'] ?? '');
    $email           = trim($_POST['email'] ?? '');
    $phone           = trim($_POST['phone'] ?? '');
    $ownsRental      = trim($_POST['ownsRental'] ?? '');
    $propertyValue   = trim($_POST['propertyValue'] ?? '');
    $mortgageBalance = trim($_POST['mortgageBalance'] ?? '');
    $cashOutAmount   = trim($_POST['cashOutAmount'] ?? '');
    $creditScore     = trim($_POST['creditScore'] ?? '');

    if (!$name || !$email || !$ownsRental || !$propertyValue || !$mortgageBalance || !$cashOutAmount || !$creditScore) {
        echo json_encode(['success' => false, 'message' => 'Please fill in all required fields']);
        exit;
    }

    $to = 'info@rideshareadvisors.com'; // your email
    $subject = "Lead from HeritusAlgorix- Investment Property";
    $body    =
            "Name: $name\n" .
            "Email: $email\n" .
            "Phone: $phone\n" .
            "Owns Rental: $ownsRental\n" .
            "Property Value: $propertyValue\n" .
            "Mortgage Balance: $mortgageBalance\n" .
            "Cash Out: $cashOutAmount\n" .
            "Credit Score: $creditScore";

        $headers = "From: $email";

    if (mail($to, $subject, $body, $headers)) {
        echo json_encode(['success' => true, 'message' => 'Message sent successfully']);
    } else {
        echo json_encode(['success' => false, 'message' => 'Mail sending failed. Try again later.']);
    }
} else {
    echo json_encode(['success' => false, 'message' => 'Invalid request']);
}
?>