Displaying user specific information
Moderator: General Moderators
Displaying user specific information
I was wondering how you go about displaying specific user information? so when a user signs up. they are assigned a unique user id. Then next time they visit how do i make it so the script displays only there information. It could be done using member.php?user_id=theidnumer but it has to be secure. so only the person who knows the right user and password can view that persons information. I hope you understand what im trying to achieve.
-
ShrineMaster
- Forum Newbie
- Posts: 7
- Joined: Mon May 20, 2002 5:33 am
Using sessions is pretty secure. If the browser gets shutdown the session cookies are usually removed.
http://www.php.net/manual/en/ref.session.php
If you want to go long term and keep the user logged in for multiple visits, you can use cookies. Instead of using the actual user id use some totally random string of letters and numbers in a cookie to identify the user. Reset the random string each time the user has to login, either from a new computer or if the cookie gets deleted.
http://www.php.net/manual/en/features.cookies.php
Good luck.
http://www.php.net/manual/en/ref.session.php
If you want to go long term and keep the user logged in for multiple visits, you can use cookies. Instead of using the actual user id use some totally random string of letters and numbers in a cookie to identify the user. Reset the random string each time the user has to login, either from a new computer or if the cookie gets deleted.
http://www.php.net/manual/en/features.cookies.php
Good luck.