Getting the Meaning of Life back
Now its time to retrieve the data and send back to the user as a formatted html page.
Copy guestin.pl as showmean.pl.
Open showmean.pl in yout text editor
Remove the parse section.
Now change the section,
open(infile,">>meaning.txt");
print infile $FORM_DATA{'name'};
print infile "\n";
print infile $FORM_DATA{'meaning'};
print infile "\n";
close(infile);
to
open(outfile,"<meaning.txt");
while ($line=<outfile>){
print $line;
print "<br />";
}
close(outfile);
To your Html form add a link that calls showmean.pl.
This should read the contents of the meaning.txt and display it in html to the user.
Exercise
Adjust your script to send all the entries in the meaning.txt back to the user as a suitably formatted web page.