I'm having a little trouble here.
I'm trying to use a session created from log in(the user id)
and take that user id and pull out information from the data base.
An example would be:
(this is not the actual code, but I will wrap it anyway)
$_session['username']; $userId = 'username'; $query ="SELECT * FROM databasetable where userId = (whatever I need to draw out)"; ( **Here's where the confusion comes in.** How would I take the $userId variable from the users login and get information such as sex being male or female, and then print userId's of the opposite sex? **)
So far I have tried about a hundred different ways with no luck, now I turn to the experts.
So I have totally confused myself - I hope I am asking the question coherently