0

Let's say, I have a web application where many users are going to submit the iformation at the same time to be redirected to another pages and complete the rest of this application process. The problem is, how can I distanguish among all the users and be able to retrive each one data for purporses in the other pages?

4
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by metalix
0

Every user session generates environment variables on the server (ip address, browser type, etc). With these variables $_SESSION and $_SERVER you can distinguish between each user.

0

And perhaps the best way of them all is url variables. Send a number to the database and pass that number through the url. The number could be just a sha1 hash of various data from the first page.

0

Are you registering users with a mysql database?
perhaps add a column autherised, and default to zero.
and a column auth which can be the users session_id

when the user completes registration send them a unique link to their email like www.example.com/confirm.php?id=42&auth=12kg19k to check by
and add that row in the database with auth as the users session id
then just use an update select * where id = id and auth = auth.

this is a simple way of doing it, there are many more efficient methods but more complex.

hope this helps :)


EDIT: the auth part in the url will be longer but daniweb isn't set up for char encoding in these forums :(

Edited by metalix: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.