Jump to content

Simultaneous Use Of A Form


niche
 Share

Recommended Posts

I have developed a with Php and Mysql. As more people are working on it simultaneously, there is the danger that two users have the same form on the screen, and one user changes fields, while the other is then working on old information.When this latter submits, he will destroy the changes that the first user made. Is there a neat way to prevent this? Blocking certain pages, making a warning? How does that work in PHP and/or Mysql?Thank-you.

Link to comment
Share on other sites

You can keep track of the last time each field was updated, and whenever someone loads the page you can record the time they loaded. When they submit the page you can compare the time they loaded the page with the time the fields were updated so that you'll know if the fields got updated since they loaded the page.

Link to comment
Share on other sites

The best I can think of is using Ajax in a "chat-like" form (or "Google Wave"-like form). Simply ping the server every second or so, and update the form if the field has changed. You won't even need a save button in this case. Other than that... I don't know.

Link to comment
Share on other sites

I've been doing some quick reading about PHP Sessions. How do I return the UID, or will I not have the need to know the UID for someone's session?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...