I have an Android app that allows the user to look up books.
The app has login page that queries a PHP script (hosted in wamp) that checks the username and password and if it exists takes you to the main page.
The main page runs a PHP script that contains a SQL script that returns a list users of the app in a listview . Upto now this works ok.
However what i want to do is just return all users but not the user that logged in. I have read that $_Session can be used as a global variable. So I could use $_Session to store the username and then run the query to get all users <> user thats logged in.
Can anyone give me an example or point me to where i can find out how to use $_Session variable for this use?
For example im on the right track using it like this?
WHERE EXISTS (SELECT 0 FROM available A1, available A2
WHERE users.uid <>$_Session [username])") or die(mysql_error())