<?php
session_start();
echo "<h1>Test POST</h1>";
echo "<pre>";
echo "REQUEST_METHOD: " . $_SERVER['REQUEST_METHOD'] . "\n";
echo "SESSION user_type: " . ($_SESSION['user_type'] ?? 'NO SET') . "\n";
echo "\nPOST data:\n";
print_r($_POST);
echo "\nFILES data:\n";
print_r($_FILES);
echo "</pre>";

if(isset($_POST['test_submit'])) {
    echo "<div style='background: green; color: white; padding: 20px;'>POST RECIBIDO CORRECTAMENTE!</div>";
}
?>

<form method="POST">
    <input type="text" name="test_field" placeholder="Campo de prueba" required>
    <button type="submit" name="test_submit">Enviar Test</button>
</form>
