<?php
session_start();
require "db_conn.php";
if(isset($_POST['text'])&& isset($_SESSION['username']))
{
$uname = $_SESSION['username'];
$text = $_POST['text'];
$sql = "INSERT INTO POSTtable (username,text) VALUES (?,?)";
$stmt = $conn->prepare($sql);
$stmt->execute([$text,$uname]);
}
?>