Perl and HTML forms

Perl and HTML forms

am 04.12.2006 14:23:36 von asticha

I'm very new to Perl, and I'm having problems with a shooping cart
application. I trying to post the the total ammount of to the PayPal
site, and I can't figure out how to pass a variable defined in the Perl
file through the HTML form, Here's the bit of code that's giving me
trouble-




value=\"blahblahblah\@email.com\">
Shipping\">
value=\"$formatted_price\">



$formatted_price is the variable that I'm having difficulties with.

Re: Perl and HTML forms

am 04.12.2006 17:34:37 von paduille.4060.mumia.w

On 12/04/2006 07:23 AM, asticha@gmail.com wrote:
> I'm very new to Perl, and I'm having problems with a shooping cart
> application. I trying to post the the total ammount of to the PayPal
> site, and I can't figure out how to pass a variable defined in the Perl
> file through the HTML form, Here's the bit of code that's giving me
> trouble-
>
>


>
>
> > value=\"blahblahblah\@email.com\">
> > Shipping\">
> > value=\"$formatted_price\">
>
>

>
> $formatted_price is the variable that I'm having difficulties with.
>

It's not easy to tell what's wrong with your program with so little
context. Perhaps $formatted_price is empty.

BTW, if you don't want to have to escape every double-quote you can
either use single-quotes, or you can put the entire string inside of a
qq operator, e.g.

my $formstr = qq{


...


};



--
paduille.4060.mumia.w@earthlink.net

Re: Perl and HTML forms

am 04.12.2006 20:51:48 von asticha

I know that the the variable isn't empty. I stuck it into a something
that prints on the screen, and it was fine. If it's not just a syntax
error I'm thinking that either the variable was declared as a local,
maybe, or that the problem is on PayPals side. The rest of the code is
fine, and works perfectly if I put something static in place of
$formatted_price, so I don't know. Thanks for the tip with the qq
though.
Ahndhi

Re: Perl and HTML forms

am 04.12.2006 21:10:44 von asticha

Yup, as it turns out it was delcared as a local, and I just happened to
test it in the right place before. Oh well, got it all up and running
now.

Re: Perl and HTML forms

am 04.12.2006 23:50:43 von paduille.4060.mumia.w

On 12/04/2006 02:10 PM, asticha@gmail.com wrote:
> Yup, as it turns out it was delcared as a local, and I just happened to
> test it in the right place before. Oh well, got it all up and running
> now.
>

I'm glad you got it working.

Next time, please try to quote a little context from the previous post
so that people can tell what is going on and so that people can know to
whom you are responding.

This post is an example of this.

--
paduille.4060.mumia.w@earthlink.net