Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


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.