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.
READ THE POST(s)$message = join('|', $usertype, $username, $date, $comments); $message .= "\n"; open ("post", "/absolute/path/to/file") or print error; print post $message; close (post);
This way you can pick the name off better in any future admin than having to search for it on a line.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> |; } }
Maybe no help at all, but there you go.
If its not, im sorry.
It was good practice for my typing skills anyway :)
ThAtH0M
In reply to Re: Re: Message Board Mangling
by Thathom
in thread Message Board Mangling
by achiles
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |