I'm new to sql and php and I know sql injection is a major problem. I've done some research but I've got a syntax error:
$q = $dbc->prepare("INSERT INTO threads (Username,Thread_title,Date_created)
VALUES('$_SESSION[Username]', ? ,NOW())");
$q = $q->bind_param('s', $_POST['Topic']);
is this the right way to go about it?