<?php
ob_start();
require("includes/check_auth_user.php");
require("includes/dbconnect.php");
include('includes/function.php');
$zdb = $_SESSION["zdbyear_" . $dbname];
mysqli_select_db($conn, $zdb);

//header('Content-Type: text/event-stream');
//header('Cache-Control: no-cache');



if (isset($_POST['name'])) {
    $name = $_POST['name'];
    $sql = "INSERT INTO `usertest`(`name`)
                                        VALUES('$name')";

    $result = mysqli_query($conn, $sql) or die(mysqli_error($conn));
   
}
?>
<html>
    <body>
        <form action="" method="post">

            <table>
                <tr>
                    <td>Name</td>
                    <td><input type="text" name="name"></td>
                </tr>
                <tr>
                    <td></td>
                    <td><input type="submit" name="Add" value="Add"></td>
                </tr>
            </table>
        </form>
    </body>
</html>

