Re: Passing value to another CGI.
From: John Bokma (postmaster_at_castleamber.com)
Date: 12/30/04
- Next message: PerlFAQ Server: "FAQ 4.14: How can I compare two dates and find the difference?"
- Previous message: Brian McCauley: "Re: Why does this work?"
- In reply to: sam: "Re: Passing value to another CGI."
- Next in thread: sam: "Re: Passing value to another CGI."
- Reply: sam: "Re: Passing value to another CGI."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: PerlFAQ Server: "FAQ 4.14: How can I compare two dates and find the difference?"
- Previous message: Brian McCauley: "Re: Why does this work?"
- In reply to: sam: "Re: Passing value to another CGI."
- Next in thread: sam: "Re: Passing value to another CGI."
- Reply: sam: "Re: Passing value to another CGI."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|