Re: Parsing variables and HTML

2002-04-17 Thread John Brooking

 Daniel,
   I'm
assuming you mean that you want your three crud
parameters passed through, in which case, your
intuition at the end of your message is correct.
Remember that HTTP is by default stateless, meaning
that when the form that was output by first() is
submitted, your script has no memory that is was ever
run before. It only knows what was in the latest
request. So you need to include more hidden fields in
your form in order to preserve them between
invocations of the
script:   
Note that by default, $variables expand in "Here"
documents the same as in double-quoted
literals.   
- John
  Daniel Falkenberg
<[EMAIL PROTECTED]> wrote: 
Hello
All,I am having a little bit of trouble with
HTML and perl. I want to beable to parse variable
from some HTML code where a user hits a
submitbutton and the data they entered from that
from should be parsed to thenext sub. At the
moment I am using the following code...$action
= param("action");$crud1 =
param("crud1");$crud2 = param("crud2");$crud3
= param("crud3");if ($action =~ /first/)
{first();}elsif ($action =~ /second_sub/)
{second_sub();}else{ first();}sub first
{print<
#User enters data in some text boxes
here...http://us.f144.mail.yahoo.com/ym/images/submit.gif";>HTML}#
Script is now taken to second_sub();sub
second_sub {print $crud1, $crud2,
$crud3;} but for some reason the
the data from first() is not being placedinto
second_sub(); Should I be adding some more hidden HTML
tags in thefirst(); sub?Any help on this
would be greatly appricated.Regards,Dan

__
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Parsing variables and HTML

2002-04-16 Thread Daniel Falkenberg

Hello All,

I am having a little bit of trouble with HTML and perl. I want to be
able to parse variable from some HTML code where a user hits a submit
button and the data they entered from that from should be parsed to the
next sub.  At the moment I am using the following code...

$action = param("action");
$crud1 = param("crud1");
$crud2 = param("crud2");
$crud3 = param("crud3");

if ($action =~ /first/)  {first();}
elsif ($action =~ /second_sub/) {second_sub();}
else{ first();}

sub first {

print<
#User enters data in some text boxes here...




HTML

}

# Script is now taken to second_sub();

sub second_sub {

print $crud1, $crud2, $crud3;

}

 but for some reason the the data from first() is not being placed
into second_sub();  Should I be adding some more hidden HTML tags in the
first(); sub?

Any help on this would be greatly appricated.

Regards,

Dan



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]