Ok,
This is a rough example and the easiest possible way without using tables etc etc (I think). Have a section in your code that has a form like:
PHP Code:
echo '<form action="review.php" method="post" enctype="multipart/form-data" border="0">
<table class="input">
<tr><td><textarea name="general" class="input" cols=65 rows=200 wrap="PHYSICAL" style="height:500;overflow:auto;">';
if (isset($_POST['general'])) echo $_POST['general'];
echo '</textarea></td>
<tr><td align="center"><input class="input" type="submit" name="submit" value="Save Changes" /></td></tr>
</table>
</form>';
Then when the form is submitted it opens a file and adds the text to it by running this:
$file = array('general.txt');
foreach ($file as $name => $value) {
$TName = substr($value, 0, -4);
$filename = "./messages/".$value;
if (isset($_POST['submit'])) {
// If the form has been submitted save the details to the file.
if (is_writeable($filename)) {
if (!$handle = fopen($filename,"w")) { echo "Cannot open file ($filename)"; exit; }
if (fwrite($handle, $_POST[$TName]) === FALSE) { echo "Cannot write to the file ($filename)"; exit; }
$_POST[$TName] = stripslashes($_POST[$TName]);
fclose ($handle);
} else { echo "The file is not writeable ($filename)"; exit; }
} else {
// Read the comments file and display it in the text area
if (!$wineFile = @fopen(stripslashes($filename), "r")) {
die("Can't open the file. Has it been moved/deleted?");
} else {
$_POST[$TName] = NULL;
while ($line = fgetcsv($wineFile, 2048, '<<')) {
$_POST[$TName] .= stripslashes($line[0]).'
';
}
}
}
}
Let me know if that helps as I have other ideas.
NM.