my code looks something like this
print header( "text/html" );
print start_html(-title => "Bookshelf at Reddo Networks",
-bgcolor => "#ffffff" );
print start_form();
print p("Document nr: ", textfield("doc_nr"));
print p("Document name: ", textfield("doc_name"));
print p("Author: ", popup_menu("author", \@authors));
print p(submit("DO"), reset("clear"));
print end_form(), hr();
print_content();
print end_html;
write_content();
sub print_content {
open(DAT, "<doc_number.dat");
@all = <DAT>;
foreach $b (@all){
print p($b);
}
close(DAT);
}
sub write_content {
print p("tada");
}
how do I run the write_content function when the submit button has been pressed