Re: Passing value to another CGI.

From: John Bokma (postmaster_at_castleamber.com)
Date: 12/30/04


Date: 30 Dec 2004 04:59:18 GMT

sam wrote:

> ioneabu@yahoo.com wrote:
>
>> Here is a little tested sample which uses multiple forms within one
>> page. There are some problems with doing it this way. From CGI home
>> page:
>>
>> General note 3. You can put multiple forms on the same page if you
>> wish. However, be warned that it isn't always easy to preserve state
>> information for more than one form at a time. See advanced techniques
>> for some hints.
>>
>> http://stein.cshl.org/WWW/software/CGI/#advanced
>>
>> #!/usr/bin/perl
>>
>> use CGI q(:standard);
>> use warnings;
>> use strict;
>>
>> print header();
>> print start_html();
>> print start_form(-action=>'form1.cgi');
>> print textfield({name=>'Name', value=>"bob"});
>> print br();
>> print end_html();
>>
>>
> Do you know how to pass the variable name "Name" and its value "bob"
> to form1.cgi?

That already happens (unless someone changes the value ;-) ).

Also, note that the print part above can be simplified as follows:

print header(),
            start_html(),
            :
            end_html();

(ie, just one print). And I guess you can drop the () too :-D.

-- 
John                   Small Perl scripts: http://johnbokma.com/perl/
               Perl programmer available:     http://castleamber.com/
            Happy Customers: http://castleamber.com/testimonials.html
                        


Relevant Pages

  • Re: Passing value to another CGI.
    ... Here is a little tested sample which uses multiple forms within one ... From CGI home ... General note 3. ...
    (comp.lang.perl.misc)
  • Re: Passing value to another CGI.
    ... From CGI home ... > General note 3. ... You can put multiple forms on the same page if you ... > print header(); ...
    (comp.lang.perl.misc)
  • Re: page counter
    ... "sam" wrote in message ... > I've got a one page that contains all the navigation and formatting, ... > for a cookie, sets a cookie, reads a count.txt file, and either adds one ... > to set multiple cookies, and store multiple numbers respectively, based ...
    (alt.php)
  • Re: SqlConnection question
    ... if you supply a name that's not a table but a stored procedure ... If there are multiple tables with the same name you ... check the recordset for a record. ... > Hi Sam, ...
    (microsoft.public.data.ado)
  • Re: multiple sheets to printer
    ... Daily Dose of Excel ... Sam wrote:> I would like to create a button or macro that will send multiple ...
    (microsoft.public.excel.programming)