Hello,

I am running a homeowner's association website (1 page only).
The manager asked if I might be able to allow her access
to make announcements from time to time.
I think this would be a good idea, but I don't want to give her
carte blanche access to the entire page. Also, I am assuming she does not know html.
Does anyone have any suggestions as to the best way this could be done?
I really (really!) want to keep this simple -- that is, no databases, no mysql, no cms, etc. I am doing this on a voluntary basis, and so I don't have an abundance of time to devote to this project.
Perhaps a way for her to go to a password-protected page, where she could write her info into a form, then in turn have it write to an html page (say, manager.html) that I could present on the main index.html page as an i-frame. It should be non-destructive (that is, now content should not over-write previous), but she should be able to manually edit all content.
This is one way, but I am open to suggestions.
Again, the simpler the better.

Thanks :)

Rick

Dani AI

Generated

A simple, robust pattern that fits the "no database, minimal administration" constraint is to treat each announcement as its own small file and let the main page assemble them. That keeps every announcement non-destructive (no single-file overwrite), makes rollbacks trivial, and gives the manager the ability to edit individual items later. This approach answers the core request from while staying lighter than a full CMS and avoids forcing a separate blog as suggested.

Implementation choices depend on what the host supports. If server scripting is available, provide a tiny password-protected admin page that creates a new fragment file (timestamped filename) in an announcements folder and optionally lets the manager edit or delete those individual files. If scripting is not an option, create a single, limited FTP/web-editor account or use the host file manager so the manager can add small HTML/text files into that folder. The main index simply includes or concatenates the newest fragment files for display (server-side include, simple loop, or build step).

Security and reliability notes you should not skip: never blindly save raw input as executable HTML; sanitize or restrict allowed tags to avoid XSS. Protect the admin area with host-level auth (HTTP basic/htpasswd or control-panel accounts) rather than rolling insecure password checks. Keep file permissions tight, use file-locking for writes to avoid corruption, and keep timestamped backups or an archive of previous fragments so accidental edits are reversible. Also enforce a sane size limit on posts.

Quick checklist for : create an announcements folder, use timestamped filenames, provide the manager with either a tiny editor or limited FTP access, have the index include only the body fragments (so layout stays under your control), and add simple sanitization + backups. This meets the original brief: simple, no DB, non-destructive, and keeps control of the main page layout.

Recommended Answers

All 5 Replies

If you are thinking of linking from your main index to her page would it not be possible for her to set up a free blog which you could link to instead & have her blog link to you. I say this as it is much easier to post announcements from a blog.

Hi there,

Thanks for the speedy reply.
I really want the content she writes to not be a link, but to instead (somehow) show up on my own index.html page.
Also, I really didn't want to get into creating/administering blog stuff....

You can set up a text area on your web page, the way it is done on blogging sites, with two text fields for username and password which would be known to the one who wants to post announcements. After that, its a simple case of validation and updating the page from the database.

The same can be done using DHTML if you are not using any server side language.

What do you guys think of this solution?:

<?php
include "password_protect_page.php";
?> 

<?
if($_POST['Submit']){
$open = fopen("testit.txt","w+");
$text = $_POST['update'];
fwrite($open, $text);
fclose($open);
echo "<div style='font-family:tahoma,sans-serif;background-color:#7fa3df;border:1px solid #000000;padding:10px;color:#f0f0f0;line-height:175%;font-size:12pt;'>";
echo "File has been Updated.<br />";
echo "File Now Reads:<br />";
$file = file("testit.txt");
foreach($file as $text) {
echo $text."<br />";
}
echo "<p style='color:#f0f0f0;'><a href=\"./\">click here to view the live updated webpage</a></p>";
echo "<p style='color:#f0f0f0;'><a href=\"./edit.php\">click here to edit again</a></p>";
echo "</div>";
}else{
$file = file("testit.txt");
echo "<form action=\"".$PHP_SELF."\" method=\"post\">";
echo "<textarea Name=\"update\" cols=\"50\" rows=\"10\">";
foreach($file as $text) {
echo $text;
}
echo "</textarea>";
echo "<input name=\"Submit\" type=\"submit\" value=\"Update\" />\n
</form>";
}
?>

Note at top: "Includes" Links to password-protect script

Thats not bad, Have you tried it on your index page yet?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.