13 replies
Hi,
Sorry to tell you, as far as I know there are no alternatives if you want to retain user-information across link-clicks.
But - if you only have a very few, and preferably controlled (by IP) users, or you know their IP-address, you might use GLOBAL post variables posted by the browser at each page request as an identifier, and store the session data/information in a database. This works fine until you have lots of users, or several users are behind the same proxy, or until one user uses more than one window/tab to browse the site (this may /may not make a problem for you, depending on the information retained...)
Hope this helps :)
Kai
by jaqui
simply put:
using these is a means of maintaining state in the stateless web environment.
even doing the database route mean having some means of identifying each user, before they "login" to be able to get the data about them stored in the db.
so, no, there is no way to completely avoid using one of these to maintain state.
the way to do so with ease of file removable is to work with the sessions, as after the session expires all session specific data is purged by default.
Thanks Jaqui for your answer.
May I ask you for more details about what you want to save across pageviews, how you want to use it and what is your server/script system?
If you try to explain in more details what you are trying to do, it might be easier for us to give you a better suited answer :)
Kai
Thanks Kairoer,
Suppose I am having 3-4 forms to gather the information from users. whenever a user fills a form and goes to next and then to next form and then comes back to first form I want to retain the information filled in by that user on all the forms filled in by the user.
I am using PHP, MySQL, Apache.
by apotheon
You're out of options for keeping track of a client across multiple sessions.
PHP gets client data from
1. cookies
2. HTTP headers
3. URLs
4. GET and POST
The only other way to make that work is by way of IP or MAC address connection state. PHP doesn't allow any way to manage identification by MAC address: you'd have to use something else to do it. IP addresses can be handled by harvesting from HTTP headers, using the $REMOTE_ADDR environment valuable, but then you're just replicating the use of session data.
What the heck could be your reason for not using session data, cookies, query strings, or forms?
by hughpoynor
by hughpoynor
by mac1ne
Hi :)
please look at my first answer - it says exactly what later replies says.
So - to your quick-fix. You could use JavaScript (if allowed on the client) to gather the information the clientside. When you have gathered all the information you want, you can do client-side verifications and other data-altering stuff, then you submit all the information to the server - that is - if you want the information on the server ;)
By using a mix of Javascript and dhtml and styles, you can even do all this with only two requests to the server - first when the client initiate&download the form(s), and then optionally a second time when the client posts the info back to the server.
Please let me know if this might solve your problem.
Other variants might be using dynamically updated pages, where you use one part of the page to do the communication with the server.
Another way would be using Flash or similiar web-related technologies.
Then a question - why do you require to do this without the sessioning?
Kai :)
Hi :)
please look at my first answer - it says exactly what later replies says.
So - to your quick-fix. You could use JavaScript (if allowed on the client) to gather the information the clientside. When you have gathered all the information you want, you can do client-side verifications and other data-altering stuff, then you submit all the information to the server - that is - if you want the information on the server ;)
By using a mix of Javascript and dhtml and styles, you can even do all this with only two requests to the server - first when the client initiate&download the form(s), and then optionally a second time when the client posts the info back to the server.
Please let me know if this might solve your problem.
Other variants might be using dynamically updated pages, where you use one part of the page to do the communication with the server.
Another way would be using Flash or similiar web-related technologies.
Then a question - why do you require to do this without the sessioning?
Kai :)
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending