As I said I would do this for you.....ah well.......
.....Eliot: You don't need javascript if it is written in cgi - I have written a guestbook that currently uses two pages but can be easily modified to use just one without the need for javascript. You just need to call the main sub again after the form is processed and then have some code to read from the database like....
sub main {
print "Content-type: text/html\n\n";
print qq|
MY MAIN PAGE IS HERE
|;
open(DB,"db.txt") || die "Can't open db:$!";
@stuff=<DB>;
close(DB);
foreach $line (@stuff) {
chomp $line;
print $line;
}
print qq|
END OF MAIN PAGE!
|;
}
Then somewhere on this main page you'd have the form which would be processed by another sub and then sub main would be called again at the end to bring you back to the main page.
eg..
sub process_form {
do the processing....
main();
}
Paul Wilson.
http://www.wiredon.net/gt/ http://www.perlmad.com/