Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 193
  • Last Modified:

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
0
mattsey
Asked:
mattsey
1 Solution
 
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
 
webmaster_prodexCommented:
#!/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
 
Computer101Commented:
Comment from expert accepted as answer.

Thank you
Computer101
E-E Moderator
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now