On Wed, 13 Jun 2001, Viljo Marrandi wrote:
> but haven't seen any examples of form subission. How it's done?
> Like there is a form with one text field and i want to add this value to
> MySQL dbase:
>
> <form method="post" action="index.tt2">
> <input type="text" name="answer">
> <input type="submit">
> </form>
See the Template::Plugin::CGI perldoc. You can access the answer by
doing:
[% USE CGI %]
The answer is: [% CGI.param('answer') %]
Note, that like normal CGI you should take care that results are not
submitted more than once should the user refresh/reload the page. Often
you want to do things such as adding to the database in your handler/cgi
script rather than in the template toolkit template (as the template
really should only really contain presentation logic.)
Hope this is of some help.
Later.
Mark.
--
s'' Mark Fowler Technology Developer Profero Ltd
http://www.profero.com/ [EMAIL PROTECTED] 020 7700 9960
';use Term'Cap;$t=Tgetent Term'Cap{};print$t->Tputs(cl);for$w(split/ +/
){for(0..30){$|=print$t->Tgoto(cm,$_,$y)." $w";select$k,$k,$k,.03}$y+=2}