Forum Moderators: coopster

Message Too Old, No Replies

Multiple users accessing script

         

tekomp

10:34 pm on Oct 10, 2005 (gmt 0)

10+ Year Member



Hi,

If I have a PHP script that a user accesses through the web and it sets variables depending on what the user enters, does it matter if more than one user accesses the script at once?

For example, if person A accesses the script and sets a variable, can this cause a conflict by person B accessing the script at the same time and setting the variable to something else?

I assume a new process is created and separate memory space allocated for each time the script is accessed and it would be ok, but I'm unsure. If this does create a conflict, how do I get around this?

Thanks.

coopster

11:42 pm on Oct 10, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



HTTP is a stateless protocol, meaning that a user requests a page, the server accepts a connection request from that user, processes the request for that user, sends information back, and then disconnects from that user.

The only way to set a variable and maintain the value for ANY particular user requires some form of state management. This process is usually called a session or "session management".