I'm attempting to insert a session variable 'username' into the database via a form
I have attempted this code but it doesn't work.
<input type="hidden" name="user" value="<? $_SESSION['username'] ?>">
and then I attempt to insert the session into the database thru a insert statement
$sql = "INSERT INTO event (username) VALUES ( '$username')";
Not sure how i should do this to be honest. Can i skip the form altogether and just insert the session into the database using the insert query?