Hi Gizmola,
Ah yes.. That TOTALLY made sense.
I see what you mean about it being public facing. I don't intend to make my system public facing, and other users will not be able to view others' URL.
Thanks for your input!
Hi NotionCommotion,
Thanks for your reply.
Yeah, I would have a user.php file that renders dynamic content based on username.
However, changing the url to www.mywebsite.com/userA seems to be the "usual" practice as seen in FB, Instagram, Twitter, etc. That's the reason for me trying to do that.
Hi all,
I have some questions about creating a simple PHP user management system. I would like to create a website for users where they are able to a. Register an account b. Login and c. View information unique to them.
1. If my website is www.mywebsite.com, how do I create a different URL for different registered users upon login. For example, if User A logs in, he/she will see www.mywebsite.com/userA
2. If each user has access to unique data, how do I create the URLs to look like this - www.mywebsite.com/userA/example-page
Appreciate any pointers. Thank you.
Hi iarp,
Thanks for your clarification.
Reference to your earlier example, where
UPDATE UsersSessionTracker SET last_activity = NOW() WHERE users_id = <the users id> AND session_id = <session_id() from php>
If session_id is different every time a user logs in, how will session_id match current session_id()?
EDIT: Okay, I realized I missed a step. I am supposed to insert the session_id() where user logs in, and then update last_activity when a user hits a new page where session_id = session_id()
Hi iarp,
Thanks for your help.
I implemented TotalLogins and it works pretty well.
For the second part, I am not very clear about the session_id variable/method. How do I get the session_id and assign it to a variable?
To clarify - The session_id is assigned to a variable at the login page or at the user registration page?
Hi all,
I already have a simple login script.
However, I am trying to create a new feature that allows me to check the number of logins for a user, and the ability to filter by time periods and total time spent per session.
How do I make sure of the SESSION class to do that? Is it possible to do this via pure PHP?
Any advice is appreciated. Thanks.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.