Forum Moderators: open

Message Too Old, No Replies

Allowing Users To Edit Content

Preventing Issues With Collisions

         

itledi

11:08 pm on Jan 22, 2008 (gmt 0)

10+ Year Member



I have many pages on my website based on content pulled from my database. One such section of a typical page would be a description, pulled from a cell from my MySQL database.

I would like to allow people to edit these descriptions, and possibly other sections of a page, akin to wikipedia, but on a much, much smaller limited scale.

I know how to write my php and mysql code to pull database cell content into a form to allow the user to change the content, and then to submit the form to update the cell, thus updating the database and database driven pages.

I'm curious how to deal with issues such as a user adds a second sentence, while a second user simatiniously fixes a typo in the first.

How does wikipedia deal with this issue? And how can I practically deal with this issue?

vincevincevince

12:23 pm on Jan 23, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Wikipedia will stop the second submitter and show them what's happened. They fix it and go back.

You could just lock the row of the table when the user starts and edit and then unlock it when they finish. Have a cron job clean up rows open for an hour.