<?php
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['add_country'])) {
    $country_name = $_POST['country_name'];
    $stmt = $conn->prepare("INSERT INTO countries (name) VALUES (?)");
    $stmt->bind_param("s", $country_name);
    $stmt->execute();
    echo "Country '$country_name' added successfully!";
}
?>

<form method="POST">
    <input type="text" name="country_name" placeholder="Country Name" required>
    <button type="submit" name="add_country">Add Country</button>
</form>
