Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.


Samuel Sirvent
Samuel Sirvent
2,074 Points

Multiple users processing the same form


I am new to html and php.. I am a bit intrigued on how php handles forms.. what happens when two or more users submit a form in the exact same time, how does php handles this, is there any way that data could be mingled between them, or how is this avoided?


2 Answers

Ricky Catron
Ricky Catron
13,023 Points

To elaborate a little on Aarons answer when you submit a form that data goes into a request. That request is sent to the server using a method such as post or get. The the server proccess the data and executes whatever it is programmed to do. Each request is seperate so data is not mingled.

It is like a group of phone lines. Simply picking up the phone doesnt connect you with everyone else who is on the phone. The call is proccessed by the central unit (the server for us) which makes the connection based on what number you dialed.

Hope that helps!

Aaron Graham
Aaron Graham
18,033 Points

When you submit your form to the server, the request is handled in its own process. This prevents data from getting mingled.