hi there, i am making a website. my problem is that, i have multiple users who should access the same page, now what i want is that, my login code will work whenever users will access it simultaneously. the problem is that, the code just checks the first logged in user.

Example, user1 and user2 logged in simultaneously. the login code detects the first logged in user it sees from the database (user1). user1 views its homepage, now user2 accesses user1's homepage since user1 logged in first. now, when user1 logs out, it will only be the time when user2 sees his homepage.

what i want is that, when both users log in simultaneously, they will see their own homepages. thanks, any code will be very much appreciated.. tnx in advance.

can you show your codes some times we can get more idea from that

hi there, i am making a website. my problem is that, i have multiple users who should access the same page, now what i want is that, my login code will work whenever users will access it simultaneously. the problem is that, the code just checks the first logged in user.

Example, user1 and user2 logged in simultaneously. the login code detects the first logged in user it sees from the database (user1). user1 views its homepage, now user2 accesses user1's homepage since user1 logged in first. now, when user1 logs out, it will only be the time when user2 sees his homepage.

what i want is that, when both users log in simultaneously, they will see their own homepages. thanks, any code will be very much appreciated.. tnx in advance.

yes, that should happen with a normal website of this kind :)
every user will see his own homepage once he logs in.
I think, I need to explain the scenario in simple language -
PHP is the serverside scripting language, the server is where my application is located and the PHP installed ,in general case.
So the client from his machine will send the request to the server of a page and the server will process the request and the response to that request is sent to the client machine.
Lets have some basic tutorial which explains this tut1 and php basic tut

in my database, i have a flag wherein whenever the user logs in, it updates the value of the flag of that specific user to 1, now, it directs to the user's homepage, btw, (when i say homepage, i only have one homepage wherein i just manipulate database to show the homepage of the specific user who logs in, ). problem is that, whenever there will be simultaneous user who logs in, the flag indicator sets to 1,but the problem is that, is it possible that many user will access the same page but with different database???

just like in friendster, simultaneous user log in with their own accounts, but they access only one page, is it possible to do that with my page too??

just like in friendster, simultaneous user log in with their own accounts, but they access only one page, is it possible to do that with my page too??

When a user logs in, store his unique identification such as a user id in session variable.. and while displaying the homepage to a specific user, use the id stored in ur session to retrieve the details of user from database and display user specific content...
Hope u got the point..

i don't know how to use sessions...T_T

i don't know how to use sessions...T_T

here are the basics...
Very easy to use, they are almost like normal variables except for the fact that it remains available across pages like global variables.. :)
Cheers

i got it already!
very thanks ^^

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.