Here's how the Everything Engine (which runs Perl Monks) handles that.
Each user has a unique ID, stored in the database. Every node I create is marked with my user ID. When I visit a node, if the user ID matches mine, the engine displays a textfield with the node text in it. It also puts a submit button below.
If I were to hit 'Submit', it would perform an update of the node in the database, simply replacing the text that was there before with the new text from the form field.
You will need:
- A database
- Some way of authenticating users -- username, cookie, password, special ID
- Some sort of association of user with text, in the database
It's not too complicated, once you know the secret. I suggest looking at
DBI.pm on CPAN, as the database and SQL parts are the only tricky things.
CGI::Cookie on CPAN might also be useful.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.