I am redoing a
simple webpage
for my
father-in-law
for our
military
collectables
and antiques
family
business. He
is not very
computer
literate and
thought it
would be easier
for him to
write/change
descriptions
for each of the
collectables
via a .TXT
file. Then all
he would have
to do is upload
the .txt file
to the hosting
server and the
page would read
it and display
the text. I
was figuring
that this could
be done through
a CSS. Could
someone tell me
how to go about
doing this so I
can get him up
and running.

Hiya bsod.
Glad to see you
still around
these forums
. The
code you gave
would have him
changing and
uploading 10
.TXT files per
webpage? Is
there a way to
tell (through
CSS file I am
assuming) the
text on these
lines in the
.TXT file to
display here,
and these next
lines to
display here,
and so on?
That way he
only has one
.TXT file per
webpage?

If PHP is
installed on
the webserver,
you can have
.php pages. The
above code is
PHP, so it must
be executed
within a
webpage with
a.php
extension.

So wherever he
wants the text
to appear, use
the above code.
It's just
saying to
include the
file in the
page. where i
have
/path/to/file,
you need to
change that to
the location of
the text file
in the web
root. If it's
in the primary
directory, then
you can delete
"/path/to
/file"
and just put in
the name of the
file.

Example: File
is named
"updates.
txt" in
the
"articles
" folder.
Then the code
would
be:Code:

<?
include($_SERVE
R['DOCUMENT_RO
OT'].'/articl
es/updates.txt
');
?>

Each time he
wants to put in
updated text,
just add to it
and save. If he
uploads a new
file with the
same exact
name, it will
overwrite the
previous and
all data in the
original file
is lost...

What you should
consider doing
for him is
this:

Se
tup a table in
a database for
"updates
"

Create an HTML
form that will
store new
records to the
table (time
stamped)

Setup the
page to
retrieve the
records from
the table by
date.
Then, he can
type in his
updates in the
HTML form. This
would be a lot
easier for him
vs. modifying
text files and
uploading them.
It also allows
for better
management of
the data. You
can setup
titles and
other fields to
categorize
entries, tags,
and so on -
giving you more
flexibility. It
may take a
little effort
to setup at
first, but once
that's
complete, it's
setup forever!