Note that most of the problems here have to do with changes made between page loads. I.e. user loads page 1, edits, goes to page 2, edits, goes to page 3, etc...
Somewhere along the line, another user starts changing things in the same record and suddenly your data is mush.
Since HTTP is stateless, and PHP runs under HTTP, there's no way to guarantee a state to be carried from one page to the next unless you, the programmer, carry that state from page to page in sessions or some database derived method.
Generally, what you're lookin for in a web system is some kind of "check out/check in feature" which doesn't rely on table / row locks.
Table and row locks are things you usually grab, execute your query, then immediately release. Any process that holds open a lock for an extended period is a bad thing, usually, and can result in one transaction holding up the database, especially in MySQL, where locks aren't so fine grained.
What you want to do is have a field that shows a record as "in edit" or "checked out" and then a harvestor that goes along every x hours and releases records that got left locked by jane doe closing her browser with content checked out.