Giarc86
Expert Member
- Joined
- May 28, 2008
- Messages
- 1,243
- Reaction score
- 4
Hi all,
I am a bit confused with this and wondered if someone could help.
I have a page that people can login to and then based on their login(username) it shows data in a table relevant to them.
I have found a script that is handling most of the hard work, I am just having trouble getting the data to display based on their login details.
I am assuming the login details would be stored in the SESSION so if I use:
should it work? Or am I missing something?
Unless the login isn't storing in SESSION? Is there another way to perform a login?
Do I need to declare something else?
Thanks for any help!
I am a bit confused with this and wondered if someone could help.
I have a page that people can login to and then based on their login(username) it shows data in a table relevant to them.
I have found a script that is handling most of the hard work, I am just having trouble getting the data to display based on their login details.
I am assuming the login details would be stored in the SESSION so if I use:
PHP:
$sql = "SELECT * FROM $tbl_name WHERE username = '" . $_SESSION['username'] . "'";
Unless the login isn't storing in SESSION? Is there another way to perform a login?
Do I need to declare something else?
Thanks for any help!