<?php
include "conexion.php";

if ($_SERVER["REQUEST_METHOD"] == "POST") {
    $nominv = $_POST['nominv'];
    $mailinv = $_POST['mailinv'];
    $dirinv = $_POST['dirinv'];
    $telinv = $_POST['telinv'];
    $reninv = $_POST['reninv'];
    
    $sql = "INSERT INTO inversionista (nominv, mailinv, dirinv, telinv, reninv) VALUES (?, ?, ?, ?, ?)";
    $stmt = $conn->prepare($sql);
    $stmt->bind_param("ssssi", $nominv, $mailinv, $dirinv, $telinv, $reninv);
    $stmt->execute();
    $stmt->close();
}
$conn->close();
header("Location: inversionista_moderno.php");
exit();
?>