<?php
// very simple escaping helper
function h($s){ return htmlspecialchars((string)$s, ENT_QUOTES, 'UTF-8'); }

$first   = $_REQUEST['first_name'] ?? '';
$last    = $_REQUEST['last_name']  ?? '';
$email   = $_REQUEST['email']      ?? '';
$comment = $_REQUEST['comment']    ?? '';
?>
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>Contact Result</title>
    <style>
        .wrap{width:400px;margin:60px auto;font-family:Arial,Helvetica,sans-serif}
        pre{white-space:pre-wrap;background:#f5f5f5;padding:8px}
    </style>
</head>
<body>
<div class="wrap">
    <p>
        Thank you <?php echo h("$first $last"); ?> [<?php echo h($email); ?>>
        for contacting us. Your message below has been sent to customer service.
    </p>
    <pre><?php echo h($comment); ?></pre>

    <p><a href="ContactForm.php">Back</a></p>
</div>
</body>
</html>
