Jump to content

Simultaneous Use Of A Form


niche

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

Many thanks to justsomeguy, boen_robot, and Deirdre's Dad. You all helped me very much.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...