Having a bit of trouble passing a session variable into a mysql query in php. Tried putting it into a variable and testing against that and no luck. Also tried various formatting already. At a loss. It's just a simple string passed in.
$result = mysqli_query($db_connection, "SELECT * FROM feedback WHERE StudentID=" . $_SESSION['BCode'] . "");
session_start()at the top of your file?