[ic] How to use value from text input box in perl block
IC
ic at tvcables.co.uk
Tue May 26 23:46:25 UTC 2009
> > Hi folks,
> >
> > I am stuck on how to take the value from a text input box and use it as
> a
> > variable in a perl block, I want to enter an order number into a box and
> use
> > it as part of a perl sql query, I know this is simple for the gurus but
> I am
> > stuck....
>
> [perl transactions orderline]
> my ($tdb, $odb) = @Db{qw{transactions orderline}};
> my $order_number = $tdb->quote($CGI->{order_number});
>
> my $sql = "SELECT * from transactions where order_number = $order_number";
>
> my $results = $tdb->query($sql);
>
> # do something with $results
>
> return;
> [/perl]
Hi Peter,
I presume the input box needs a value="[cgi order_number]" to make this
work, this is what I tried but I get this message:-
Safe: 'require' trapped by operation mask at
/usr/local/interchange/lib/Vend/Table/DBI.pm line 1987.
Thanks,
Andy.
More information about the interchange-users
mailing list