<?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');

$sql = "INSERT INTO `usertest`(`name`)
                                        VALUES('12')";

$result = mysqli_query($conn, $sql) or die(mysqli_error($conn));

$res = mysqli_query($conn, "SELECT * FROM `usertest` WHERE name='12'") or die(mysqli_error($conn));
$num = mysqli_num_rows($res);

if ($num > 0) {
    $time = date('r');

    echo 'data: Added on' . $time . " Person Abdur\n\n";
}
?>


