CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Intermediate:
"locking" file for a long time (CGI)?



May 21, 2005, 8:09 PM

Post #1 of 1 (4079 views)
"locking" file for a long time (CGI)? Can't Post

im making an online dictionary script, a rather simple one. and i've decided to use plain text files to hold data. i want people to be able to add words to it, and moderators to delete/modify data. one thing i want to do is to prevent a modrerator to delete/modify an entry while its being edited by another moderator. how can i do it?

at first i was thinking of adding some "status" field for entries in the dictionary file, so i can "reserve" them when one person click to edit. so while its reserved no other moderator can edit/delete this entry, meanwhile people can read the file and and add to it. but then, what if moderator changes his mind and just closes "edit" window, or his browser crashes... then "reserve" field doesn't get cleared...

is there better way to do it? how whould you do it?

thanks in advance! im not sure if it belongs to this section, if it isn't i apologise.
[ noobie alert ] WinXP :: Xitami Webserver :: Active Perl 5.8.6


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives