for example $_session[eid]
select * from results where user = :eid
it should display results related only to the logged in user with reference to the use column
which has names as a string
If you want use like variable just start like:
session_start(); $eid=$_SESSION['eid']; $query=$mysqli->prepare("select * from results where user = ?"); $query->bind_param('i',$eid); execute ecc ecc......