Web Development

General discussion


Page content update management

By young77478 ·
Hello experts - I want to provide my client with an "easy" way to update page content (changes in schedule dates). The client knows how to upload files to his web host but has no web programming skills. Can you suggest a way to link a simple Notepad or Word-type doc to display on a page?


This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

PHP Solution

by pete8 In reply to Page content update manag ...

Here's a php solution:

data.txt is a tab delimited file:
10/2/2004 [tab] Event1 [newline]
11/1/2004 [tab] Event2 [newline]

function ReadFromFile () {
/* Function ReadFromFile displays all the information stored in an external file. */
$TheFile = "data.txt";
$Open = fopen ($TheFile, "r");
if ($Open) {
print ("<table border=0 cellspacing=0 cellpadding=3>\n");
$Data = file ($TheFile);
for ($n = 0; $n < count($Data); $n++) {
$GetLine = explode("\t", $Data[$n]); // split on tabs
print ("<tr><td valign=top width=50><font size=2>$GetLine[0]</font></td><td> </td><td valign=top><font size=2>$GetLine[1]</font></td></tr>\n");
//$GetLine[0] is the first element of the array - the date.
print ("</table>\n");
fclose ($Open);
print ("<P>\n");
} else {
print ("Unable to read from data.txt!<BR>\n");
} // End of ReadFromFile Function.

<table><tr><td valign="top">
<? ReadFromFile(); ?>


Hope this helps - this is one of many solutions.

Collapse -


by young77478 In reply to PHP Solution


Sorry for not responding way back in 2004! Don't know how this one slipped by. In any case, thanks. After the initial request from my client, he decided to use me to update the pages. Better for my income stream.

Related Discussions

Related Forums