I am making a booking system using php and mysql. The system will involve retrieving booking records of different users from mysql. I am currently having difficulties in selecting bookings made by different users. I want to select records based on user logged in. I have used the code below where it should select records from table bookings as well as the user session. But, this code does not display any bookings.
$sqlquery = "SELECT * FROM bookings,users where users.id= ".$_SESSION['loggedInUser']."";
$results = $mysqli->query($sqlquery);
I have been facing this issue for a while and i really want to select bookings made by users login.