Trivial Scripting Scenario...

A web form contains a text area control.
On submittion of the form, the contents are to be automatically added to a simple table on a given page.

....how can this be done?

Matt Sey
mattseyAsked:
Who is Participating?
 
webmaster_prodexConnect With a Mentor Commented:
#!/usr/bin/perl
use CGI;

$cgi = new CGI;
@allparam = $cgi->param();
print "<table>";
foreach $key (0 .. $#allparam)
{
print "<tr><td> $key </td> <td> $allparam[$key] </td>";
}
print "</table>";
0
 
holliCommented:
you will need to have to scripts (or one with two functionalities)

one must take the data from the form and save it on the server. the other must read the data and print it as html.

0
 
bebonhamCommented:
if(param('submitbuttonname'))
{
##reprint the page however you like now with the data
exit;
}

(make sure you check that before you print anything)

inother words

#!/usr/bin/perl
use CGI ':standard';
if(param('submitbuttonname'))
{
##reprint the page however you like now with the data
exit;
}


## then the rest of the script as before
0
 
Computer101Commented:
Comment from expert accepted as answer.

Thank you
Computer101
E-E Moderator
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.