Welcome Guest, Not a member yet? Register   Sign In
Persistant Objects
#8

[eluser]WanWizard[/eluser]
i'm clueless to what you're talking about.

A web application is stateless. You request a URI, and get HTML in return. While the user decides on a course of action, the PHP script has finished, all variables and objects destroyed. If the user has decided, and clicks on a link or presses a button, a new request goes to the webserver, which is not aware of the previous request, so it can't reference anything from that request. If you want to preserve state, you have to use server-side storage, and a client side identifier to be able to retrieve the correct data out of that storage. Aka sessions.


Messages In This Thread
Persistant Objects - by El Forum - 06-30-2010, 11:14 AM
Persistant Objects - by El Forum - 06-30-2010, 11:23 AM
Persistant Objects - by El Forum - 06-30-2010, 12:41 PM
Persistant Objects - by El Forum - 06-30-2010, 12:49 PM
Persistant Objects - by El Forum - 06-30-2010, 02:22 PM
Persistant Objects - by El Forum - 06-30-2010, 02:57 PM
Persistant Objects - by El Forum - 06-30-2010, 02:58 PM
Persistant Objects - by El Forum - 06-30-2010, 03:05 PM
Persistant Objects - by El Forum - 06-30-2010, 03:10 PM
Persistant Objects - by El Forum - 07-01-2010, 01:50 AM



Theme © iAndrew 2016 - Forum software by © MyBB