I think it would have save you alot of time if you'd set the store method up alot better.
Maybe this way could have helped??
SAVE THE POST
--------------------------------------------------------
Bring in data from FORM as usual
Set usertype from form to be either "admin" or "guest" maybe as a type=hidden depending on whatever login rights you store.
$message = join('|', $usertype, $username, $date, $comments);
$message .= "\n";
open ("post", "/absolute/path/to/file") or print error;
print post $message;
close (post);
READ THE POST(s)
-------------------------------------------------------
Choose to read admin only on this instance...
$readtype = 'admin';
open ("post", "/absolute/path/to/file") or print error;
@post = <post>;
close (post);
foreach (@post) {
($usertype, $username, $date, $comments) = split ('[|]',$_);
if ($readtype eq $usertype) {
print qq|
From $username ($date):<p>
$comments<p>
______________________________________<br>
|;
}
}
This way you can pick the name off better in any future admin than having to search for it on a line.
Maybe no help at all, but there you go.
If its not, im sorry.
It was good practice for my typing skills anyway :)
ThAtH0M
|