<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    $name = $_POST['name'] ?? '';
    $email = $_POST['email'] ?? '';
    $subject = $_POST['subject'] ?? '';
    $message = $_POST['message'] ?? '';
    
    // Here you would typically:
    // 1. Validate the input
    // 2. Sanitize the data
    // 3. Send an email or store in database
    
    // For now, we'll just redirect back with a success message
    header("Location: kontak.php?status=success");
    exit();
}

// If not POST request, redirect to contact page
header("Location: kontak.php");
exit();
?>