So when a user logs into my site, I pull the user ID from the users table and save it in the session. THis works i've tested it by using
echo "test" . $_SESSION['UserID'];
this displays the current user ID now how do I use $_SESSION['UserID'] in a mysql query to get a number from a different table which has user ID as a foreign key?
Apologies if this seems stupid, first time dealing with sessions